PgMenu.xaml 3.78 KB
Newer Older
潘栩锋's avatar
潘栩锋 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
<Page x:Class="MultiLayout.PgMenu"
      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:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
      mc:Ignorable="d" 
      d:DesignHeight="768" d:DesignWidth="1388" 
      Background="White"
    
	Title="Page_Menu">
    <Page.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/MultiLayout;component/Themes/Styles.xaml"/>
            </ResourceDictionary.MergedDictionaries>
            <SolidColorBrush x:Key="Color_menu" Color="#C00083D7"/>
            <Style TargetType="TextBlock" x:Key="TextStyle_menuContent">
                <Setter Property="FontWeight" Value="Bold"/>
                <Setter Property="FontFamily" Value="YouYuan"/>
                <Setter Property="VerticalAlignment" Value="Center"/>
                <Setter Property="Foreground" Value="White"/>
                <Setter Property="FontSize" Value="40"/>
                <Setter Property="Background" Value="{StaticResource Color_menu}"/>
                <Setter Property="Padding" Value="10"/>
            </Style>
            
            <Style TargetType="Button" x:Key="ButtonStyle_menu" BasedOn="{StaticResource ButtonStyle_empty}" >
                <Setter Property="Background" Value="{StaticResource Color_menu}"/>
                <Setter Property="Width" Value="225"/>
                <Setter Property="Height" Value="140"/>
                <Setter Property="Margin" Value="5"/>
                <Style.Resources>
                    <Style TargetType="TextBlock" BasedOn="{StaticResource TextStyle_menuContent}"/>
                </Style.Resources>
            </Style>

        </ResourceDictionary>
    </Page.Resources>
    <Grid >
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition />
        </Grid.RowDefinitions>
        <StackPanel Orientation="Horizontal" >
46 47 48
            <Button Style="{StaticResource Styles.TitleBar.BackButton}" Click="btnBackClick" >
                <iconPacks:PackIconMaterial Kind="ArrowLeftThick" />
            </Button>
潘栩锋's avatar
潘栩锋 committed
49 50
        </StackPanel>
        <ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Disabled" HorizontalScrollBarVisibility="Auto" >
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="100" />
                    <ColumnDefinition />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>

                    <RowDefinition />
                    <RowDefinition Height="100" />
                </Grid.RowDefinitions>
                <ItemsControl x:Name="itemsControl0" Grid.Column="1">
                    <ItemsControl.Resources>
                        <Style TargetType="Button" BasedOn="{StaticResource Styles.PgMenu.ItemButton}"/>
                    </ItemsControl.Resources>
                    <ItemsControl.ItemsPanel>
                        <ItemsPanelTemplate>
                            <WrapPanel Orientation="Vertical"/>
                        </ItemsPanelTemplate>
                    </ItemsControl.ItemsPanel>
                    <ItemsControl.ItemTemplate>
                        <DataTemplate>
                            <Button Background="{Binding Brush}" Click="Button_Click" >
                                <TextBlock Text="{Binding Title}" />
                            </Button>
                        </DataTemplate>
                    </ItemsControl.ItemTemplate>
                </ItemsControl>
            </Grid>
潘栩锋's avatar
潘栩锋 committed
79 80 81
        </ScrollViewer>
    </Grid>
</Page>