Hello,
I am looking for a way to achieve following setup:
1. Completly hide the grid section including the splitter between Grid and Chart
2. Bind individual colors to each taskbar. Yes, I received an information how to get this done with a DefaultStyle - is there a simpler way? https://ko.infragistics.com/community/forums/t/108988.aspx
3. Bind a text and show it above the taskbar or inside the taskbar.
4. Scale the Gantt chart that it shows the whole project: If one project runs for eg. 5 weeks I would like to show months, weeks and days. If another one runs for two years I would like to show only months. At the same time I would like to scale the whole project that i fits into the gantt diagram.
5. What is the motivation to make the property IsVisible on the TimescaleBand not a dependency property that it can be bound?
Thanks
Nikolaus Kern
Hello Niko,
You are absolutely right - setting GridWidth to 0 would not hide the splitter as it is not part of the grid. In order to hide the splitter and prevent users from resizing and showing the grid portion I would suggest adding the following style to the XamGantt's resources:
<ig:XamGantt.Resources>
<Style TargetType="{x:Type igPrim:ProjectGridSplitter}">
<Setter Property="Visibility" Value="Collapsed" />
</Style>
</ig:XamGantt.Resources>
Please let me know if I can provide any further assistance.
I just saw that the image is not included in the posting. 2nd try as attachment.
Niko
Hello Martin,
I can't get the gridwith working:
<ig:XamGantt Grid.Column="0" Grid.ColumnSpan="7" Grid.Row="4" Name="ArbeitspaketePlanung" Project="{Binding ElementName=Bauabschnitte2Project, UpdateSourceTrigger=PropertyChanged}" GridWidth="0" TabIndex="31" TaskDependencyLineType="None" Margin="0,20,0,0" VerticalAlignment="Stretch" BorderThickness="0">
<ig:XamGantt.ViewSettings> <ig:ProjectViewSettings> <ig:ProjectViewSettings.Timescale> <ig:Timescale> <ig:TimescaleBand DisplayFormat="MMMM yyyy" Unit="Months" /> <ig:TimescaleBand DisplayFormat="'KW' {W2}" Unit="Weeks" /> <ig:TimescaleBand DisplayFormat="dd" Unit="Days" IsVisible="false" /> </ig:Timescale> </ig:ProjectViewSettings.Timescale> </ig:ProjectViewSettings> </ig:XamGantt.ViewSettings></ig:XamGantt>
You see the result in the image below: There is a small gridsplitter in the left side that can be used to open the grid part of the gantt diagramm.
Hello Nikolaus,
The grid section including the splitter can be hidden by setting XamGantt's GridWidth to 0.
Regarding binding individual colors to each taskbar, the only reasonable way is to modify the default style.
Binding a text and show it above or below a taskbar can also be done by modifying the default style but it might require major changes in the style.
The top and middle bands have Unit property that can be used for setting different options - Weeks, Years, Months.
IsVisible gives information if a TimescaleBand is dispalayed or not. A dependency property that's related to IsVisible is the respective TimescaleBandPresenter's Visibility property.
Please take a look at the attached sample where you can see that only the chart part is displayed and there are comboboxes for setting top and middle bands Unit property.
Sincerely,Martin BogdanovSoftware Developer