RoleView.xaml 2.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. <UserControl x:Class="Venus_MainPages.Views.RoleView"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:Venus_MainPages.Views"
  7. xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
  8. xmlns:prism="http://prismlibrary.com/"
  9. prism:ViewModelLocator.AutoWireViewModel="True"
  10. mc:Ignorable="d"
  11. d:DesignHeight="450" d:DesignWidth="800">
  12. <StackPanel>
  13. <TreeView Name="checkView" Grid.Column="0" Margin="0,50,0,0" ItemsSource="{Binding VenusMenus}" Width="Auto">
  14. <TreeView.ItemTemplate>
  15. <HierarchicalDataTemplate ItemsSource="{Binding MenuItem,Mode=OneTime}">
  16. <StackPanel Orientation="Horizontal">
  17. <CheckBox IsChecked="{Binding Path=IsShow}">
  18. <!--<i:Interaction.Triggers>
  19. <i:EventTrigger EventName="Checked">
  20. <i:InvokeCommandAction Command="{Binding Path=DataContext.MenuItem,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=TreeViewItem}}" CommandParameter="{Binding}"/>
  21. </i:EventTrigger>
  22. </i:Interaction.Triggers>-->
  23. </CheckBox>
  24. <TextBlock Foreground="White" FontSize="15" Text="{Binding Path=Id}" HorizontalAlignment="Center" />
  25. </StackPanel>
  26. </HierarchicalDataTemplate>
  27. </TreeView.ItemTemplate>
  28. </TreeView>
  29. <Button Content="Save" Command="{Binding SaveCommand}" Grid.Row="1" Width="100" Height="20" HorizontalAlignment="Left"/>
  30. </StackPanel>
  31. </UserControl>