<TreeView x:Name="treeParameter" Width="350" MinHeight="300" Margin="11,6,11,6" ItemsSource="{Binding ItemSource}"> <TreeView.ItemContainerStyle> <Style TargetType="{x:Type TreeViewItem}"> <Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" /> <Setter Property="FontWeight" Value="Normal" /> <Setter Property="Foreground" Value="#0c223a"></Setter> <Setter Property="FontSize" Value="14"></Setter> <Setter Property="FontFamily" Value="Arial"></Setter> <Setter Property="Margin" Value="0,3,0,3"></Setter> <Setter Property="Background" Value="Transparent"></Setter> <Style.Triggers> <Trigger Property="IsSelected" Value="True"> <Setter Property="FontWeight" Value="Bold" /> </Trigger> </Style.Triggers> </Style> </TreeView.ItemContainerStyle> <Event:Interaction.Triggers> <Event:EventTrigger EventName="SelectedItemChanged" SourceName="treeParameter"> <Event:InvokeCommandAction Command="{Binding SelectedChangedCommand}" CommandParameter="{Binding ElementName=treeParameter,Path=SelectedItem}"> </Event:InvokeCommandAction> </Event:EventTrigger> </Event:Interaction.Triggers> <TreeView.ItemTemplate> <HierarchicalDataTemplate ItemsSource="{Binding ChildNodes,Mode=TwoWay}"> <TextBlock Text="{Binding ParameterName, Mode=TwoWay}" /> </HierarchicalDataTemplate> </TreeView.ItemTemplate> </TreeView>