Hello,
the tree row is not selectable (focusable) when StackPanel is used inside a Grid for a NodeLayout.ItemTemplate.
<ig:NodeLayout Key="main" TargetTypeName="DataItem"> <ig:NodeLayout.ItemTemplate> <DataTemplate> <Border BorderThickness="0,0,0,1" BorderBrush="{Binding Data.Color}"> <!--<StackPanel Orientation="Horizontal" Margin="0,0,0,2"> <Rectangle Fill="{Binding Data.Color}" Width="25" Height="25"/> <Label Content="{Binding Data.Label}" Width="200"/> <TextBox Text="{Binding Data.Value}" Width="50"/> <Button Content="-" Width="20" Command="{Binding Data.DecValueCommand}"/> <Button Content="+" Width="20" Command="{Binding Data.IncValueCommand}"/> </StackPanel>--> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto"/> <ColumnDefinition Width="250"/> <ColumnDefinition Width="Auto"/> </Grid.ColumnDefinitions> <Rectangle Grid.Column="0" Fill="{Binding Data.Color}" Width="25" Height="25"/> <StackPanel Grid.Column="1" Orientation="Horizontal"> <Label Content="{Binding Data.Label}"/> </StackPanel> <StackPanel Grid.Column="2" Orientation="Horizontal"> <TextBox Text="{Binding Data.Value}" Width="50"/> <Button Content="-" Width="20" Command="{Binding Data.DecValueCommand}"/> <Button Content="+" Width="20" Command="{Binding Data.IncValueCommand}"/> </StackPanel> </Grid> </Border> </DataTemplate> </ig:NodeLayout.ItemTemplate> </ig:NodeLayout>
Hello Markus,
Thank you for contacting Infragistics. With the code you've provided and behavior you've described the issue is not familar. Please provide a complete sample that I can test and I will investigate this further.
Let me know if you have any questions.
attached is the sample project.
When retemplating the Label within the stackpanel you will need to set the Width again to '250' to get the entire node to highlight. Otherwise the label will only be '25' pixels in length. The column definition is set to '250' but nothing is actually taking up that space.
eg.
<StackPanel Grid.Column="1" Orientation="Horizontal"> <Label Content="{Binding Data.Label}" Width="250"/> </StackPanel>