hi
i want to design XamTreeGrid column header like this picture
thanks for your attention
Hello Behzad,
Thank you for your feedback. I am glad to know that I was able to help you achieve the functionality you were looking for. I believe this thread can help other people looking for a similar solution.
If you require any further assistance on this matter, please do not hesitate to contact us.
i want to have other control inside header .
and your example open new window for me and add some xaml to have that control
that xaml something like this
<Style x:Key="style1" TargetType="{x:Type igDP:LabelPresenter}">
<Setter Property="Background" Value="LightGreen" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ContentControl}">
<StackPanel>
<ContentPresenter ContentTemplate="{TemplateBinding ContentTemplate}"
Content="{Binding Content, RelativeSource={RelativeSource TemplatedParent}}" />
<TextBlock Text="show your text" Background="blue" Foreground="white"/> <!--add other control-->
</StackPanel>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
Thank you for choosing Infragistics.
I have been looking into your issue and I have prepared a sample application for you to test and see if the desired effect is achieved.
I have created a FileNode class representing a single Node with possible sub nodes. In the SimpleDataSource class I have created a sample collection containing FileNodes and I have bound the DataSource property of the XamTreeGrid to this collection through the FileNodes property. I have defined a couple of styles in the grid's resources that target the LabelPresenter visual element and I have set it's Background property to a specific color. In the FieldLayouts of the XamTreeGrid I have explicitly set the LabelPresenterStyle property of each field to a style from the grid's resources.
If you need any further assistance on this matter, please do not hesitate to ask.