Hello,
is it possible that the Item in the XamDataTree is using the width of the its container control? I want to use a Grid as Tree Item, and the "Label" part of that grid, should always use the remaining space of the whole DataTree control.
<ig:NodeLayout.ItemTemplate> <DataTemplate> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto"/> <!-- Color --> <ColumnDefinition Width="*"/> <!-- Label: Object Class --> <ColumnDefinition Width="Auto"/> <!-- Label: Absolute Region Text--> </Grid.ColumnDefinitions> <Rectangle Grid.Column="0" Width="40" Height="40" Fill="{Binding Data.ClassColor}" Margin="2"/> <TextBlock Grid.Column="1" Text="{Binding Data.ClassLabel}" VerticalAlignment="Center" TextWrapping="Wrap"/> <StackPanel Grid.Column="2" Orientation="Horizontal"> <igWPF:XamNumericEditor Value="{Binding Data.AbsoluteRegionCriteria}" Mask="-nnnnnn" Format="+0 px;-0 px;0" PromptChar="" Width="80" VerticalContentAlignment="Center" Margin="2"/> <Button Content="-" Command="{Binding Data.DecAbsoluteRegionCriteriaCommand}" Width="40" Margin="2" "/> <Button Content="+" Command="{Binding Data.IncAbsoluteRegionCriteriaCommand}" Width="40" Margin="2"/> </StackPanel> </Grid> </DataTemplate></ig:NodeLayout.ItemTemplate>
Hello Markus,
As far as I can understand, your requirement is to stretch the xamDataTree item to the width of its container.
You may find this forum post useful: https://es.infragistics.com/community/forums/t/51731.aspx
I’ve attached a sample demonstrating the described approach.
Let me know if I may be of further assistance.
Thanks that is exactly what I want, but is there no other way without modifying Infargistic controls? If in the future something changes in Infragistic controls I have maintain such changes.