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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<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" >
<Button Style="{StaticResource ButtonStyle_back}" Click="btnBackClick"/>
</StackPanel>
<ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Disabled" HorizontalScrollBarVisibility="Auto" >
<ItemsControl x:Name="itemsControl0" Margin="100,100,0,20">
<ItemsControl.Resources>
<Style TargetType="Button" BasedOn="{StaticResource ButtonStyle_menu}"/>
</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>
</ScrollViewer>
</Grid>
</Page>