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.
The width of each node is handled internally by the NodesPanel of the xamDataTree and currently there is no other way of doing this.
You can suggest such an improvement as a new product idea for future versions at <http://ideas.infragistics.com>.
Submitting your idea will allow you to communicate directly with our product management team, track the progress of your idea at any time, see how many votes it got, read comments from other developers in the community, and see if someone from the product team has additional questions for you.
Remember when submitting your idea to explain the context in which a feature would be used and why it is needed as well as anything that would prevent you from accomplishing this today. You can even add screenshots to build a stronger case. Remember that for your suggestion to be successful, you need other members of the community to vote for it. You can also link back to this thread for additional details.
Thank you in advance to submitting your product idea.