<TreeView ItemContainerStyle="{StaticResource TheStyle}" Background="White" HorizontalAlignment="Stretch" BorderBrush="Transparent" >
<i:Interaction.Triggers>
<i:EventTrigger EventName="SelectedItemChanged">
<prismInt:InvokeCommandAction Command="{Binding SelectionChangedCommand}" CommandParameter="{Binding RelativeSource={RelativeSource AncestorType={x:Type TreeView}}, Path=SelectedValue}"/>
</i:EventTrigger>
</i:Interaction.Triggers>
<TreeViewItem ItemsSource="{Binding myobjects}" IsExpanded="True" Focusable="true">
<DataTemplate>
<TextBlock Text="{Binding Name}" />
</DataTemplate>
<!--<TextBlock Text="{Binding Name}" />-->
<TreeViewItem.HeaderTemplate>
<DataTemplate>
<TextBlock Text="Antennas" DataContext="{Binding Path=DataContext, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type UserControl}}}">
<TextBlock.ContextMenu>
<ContextMenu>
<MenuItem Header="Add..." Command="{Binding PlacementTarget.DataContext.AddItemCommand, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ContextMenu}}}" />
</ContextMenu>
</TextBlock.ContextMenu>
</TextBlock>
</DataTemplate>
</TreeViewItem.HeaderTemplate>
<TreeViewItem.ContextMenu>
<ContextMenu>
<MenuItem Header="Delete" Command="{Binding Path=DeleteItemCommand}" CommandParameter="{Binding PlacementTarget, RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type ContextMenu}}}"/>
</ContextMenu>
</TreeViewItem.ContextMenu>
</TreeViewItem>
</TreeView>
-----------------------------------------------------------------------------
ResizeMode="CanMinimize" ShowInTaskbar="True" Topmost="False"
任务栏 点击程序图标 放大缩小