添加项目文件。
This commit is contained in:
58
WPFWCSDemo/Views/Settings/SettingView.xaml
Normal file
58
WPFWCSDemo/Views/Settings/SettingView.xaml
Normal file
@@ -0,0 +1,58 @@
|
||||
<Page x:Class="WPFWCSDemo.Views.SettingView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:md="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||||
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
||||
xmlns:viewmodels="clr-namespace:WPFWCSDemo.ViewModels"
|
||||
d:DataContext="{d:DesignInstance Type=viewmodels:SettingViewModel}"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="850" d:DesignWidth="1600"
|
||||
Title="SettingView">
|
||||
|
||||
|
||||
<Grid Margin="0,0,0,30">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="700"/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Text="设置" FontSize="30" FontWeight="Bold" Margin="20"/>
|
||||
<Separator Grid.Row="1" VerticalAlignment="Bottom" Background="Gray" BorderThickness="0.5"/>
|
||||
<Grid Grid.Row="1" Margin="50,10">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<ListBox x:Name="settingMenu" Grid.Row="1" ItemsSource="{Binding Menu}" ItemContainerStyle="{StaticResource myListBoxItemStyle}">
|
||||
<!--添加行为触发(例:通过选中项的改变触发某个事件)-->
|
||||
<i:Interaction.Triggers>
|
||||
<!--设定触发的事件-->
|
||||
<i:EventTrigger EventName="SelectionChanged">
|
||||
<!--绑定动作对象的属性-->
|
||||
<i:InvokeCommandAction Command="{Binding SettingNavigateCommand}" CommandParameter="{Binding ElementName=settingMenu,Path=SelectedItem}"/>
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Orientation="Horizontal" Background="Transparent">
|
||||
<md:PackIcon Kind="{Binding Icon}" FontSize="16" Margin="40,20" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="{Binding Title}" FontSize="16" VerticalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
|
||||
<Border Grid.Column="1">
|
||||
<Frame x:Name="settingFrame" Background="#FAFAFA" Margin="20 0 0 0"/>
|
||||
<Border.Effect>
|
||||
<DropShadowEffect ShadowDepth="3" BlurRadius="10" Direction="200" Color="Black" Opacity="0.3"/>
|
||||
</Border.Effect>
|
||||
</Border>
|
||||
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Page>
|
||||
Reference in New Issue
Block a user