-
Notifications
You must be signed in to change notification settings - Fork 124
/
Copy pathCustomStyleSelector.cs
28 lines (27 loc) · 1.27 KB
/
CustomStyleSelector.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#region Copyright Syncfusion Inc. 2001-2020.
// Copyright Syncfusion Inc. 2001-2020. All rights reserved.
// Use of this code is subject to the terms of our license.
// A copy of the current license can be obtained at any time by e-mailing
// licensing@syncfusion.com. Any infringement will be prosecuted under
// applicable laws.
#endregion
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Controls;
using Syncfusion.Windows.Controls.Gantt;
using System.Windows;
namespace syncfusion.ganttdemos.wpf
{
public class CustomStyleSelector : StyleSelector
{
public override Style SelectStyle(object item, DependencyObject container)
{
StripLine info = item as StripLine;
if (info.StartDate == new DateTime(2012, 6, 18) || info.StartDate == new DateTime(2012, 7, 16) || info.StartDate == new DateTime(2012, 9, 3) || info.StartDate == new DateTime(2012, 9, 10) || info.StartDate == new DateTime(2012, 9, 24) || info.StartDate == new DateTime(2012, 10, 8) || info.StartDate == new DateTime(2012, 12, 3) || info.StartDate == new DateTime(2012, 11, 12))
return GanttDictionaries.GanttStyleDictionary["strip"] as Style;
return base.SelectStyle(item, container);
}
}
}