Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
3220
Item Client Width
posted

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>

Parents Reply Children