Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
142124 | Jan 21,2019 11:28 AM UTC | Jan 23,2019 09:35 AM UTC | WPF | 3 |
![]() |
Tags: GanttControl |
MainWindow.Xaml
<gantt:GanttControl x:Name="Gantt" ItemsSource="{Binding TeamDetails}"
ShowDateWithTime="True"
ShowNonWorkingHoursBackground="False"
ShowChartLines="False"
ToolTipTemplate="{StaticResource toolTipTemplate}"
VisualStyle="Metro">
<gantt:GanttControl.TaskAttributeMapping> <gantt:TaskAttributeMapping TaskNameMapping="Name"
StartDateMapping="StartDate"
ChildMapping="SubItems"
FinishDateMapping="FinishDate"
ProgressMapping="Progress"
InLineTaskMapping="InLineItems"/>
</gantt:GanttControl.TaskAttributeMapping>
MainWindow.Xaml.cs public ObservableCollection<Item> GetTeamInfo() {
DateTime dtS = DateTime.Today;
ObservableCollection<Item> teams = new ObservableCollection<Item>();
teams.Add(new Item() { Name = "RDU Team" });
Item Person = new Item() { Name = "Robert" };
// Milestone Person.InLineItems.Add(new Item() { StartDate = new DateTime(2012, 01, 07), FinishDate = new DateTime(2012, 01, 07), Name = "Market Analysis", Progress = 50d });
Person.InLineItems.Add(new Item() { StartDate = new DateTime(2012, 01, 11,12,0,0), FinishDate = new DateTime(2012, 01, 17), Name = "Competitor Analysis", Progress = 20d });
Person.InLineItems.Add(new Item() { StartDate = new DateTime(2012, 01, 17,12,0,0), FinishDate = new DateTime(2012, 01, 21), Name = "Design Spec" });
teams[0].SubItems.Add(Person);
return teams; } |
<Style x:Key="MileStone" TargetType="gchart:MileStone">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="gchart:MileStone">
<Grid>
<Image Source="image.png" Height="19" Width="19"/>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style> <gantt:GanttControl.Resources> <Style BasedOn="{StaticResource MileStone}" TargetType="gchart:MileStone" />
</gantt:GanttControl.Resources> |
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.