Hi,
I have the following DataTemplate. I would like the HierarchicalDataTemplate to display a checkbox or Radiobutton instead of the TextBlock. TreeViewItems could be mixed as you traverse downwards.
<DataTemplate DataType="{x:Type vm:ComponentModel}"><Grid><Grid.RowDefinitions><RowDefinition Height="26"/><RowDefinition Height="*"/></Grid.RowDefinitions><StackPanel Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Stretch"><TextBlock Text="Operation" Margin="2"/><ComboBox Margin="2" Width="150" ItemsSource="{Binding Operations}"></ComboBox></StackPanel><ListBox Grid.Row="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" ItemsSource="{Binding Items}"><ItemsControl.ItemTemplate><DataTemplate><TreeViewItem ItemsSource="{Binding Nodes}" Header="{Binding Name}"><TreeViewItem.ItemTemplate><HierarchicalDataTemplate ItemsSource="{Binding Nodes}"><TextBlock Text="{Binding Name}"/></HierarchicalDataTemplate></TreeViewItem.ItemTemplate><TreeViewItem.ItemContainerStyle><Style TargetType="{x:Type TreeViewItem}"><Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}"/><Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}"/><Setter Property="FontWeight" Value="Normal"/><Style.Triggers><Trigger Property="IsSelected" Value="True"><Setter Property="FontWeight" Value="Bold"/></Trigger></Style.Triggers></Style></TreeViewItem.ItemContainerStyle></TreeViewItem></DataTemplate></ItemsControl.ItemTemplate></ListBox></Grid></DataTemplate>