PgMenu.xaml 5.01 KB
Newer Older
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 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
<Page x:Class="FLY.DownBlowing.UI.Client.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:local="clr-namespace:FLY.DownBlowing.UI.Client"
      xmlns:misc="clr-namespace:Misc;assembly=MISC" xmlns:ut="clr-namespace:FLY.DownBlowing.UI.Client.UnitTests"
      mc:Ignorable="d" 
      d:DesignHeight="768" d:DesignWidth="1388" 
      Background="White"
	Title="Page_Menu">
    <Page.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/Dictionary_MyStyle.xaml"/>
            </ResourceDictionary.MergedDictionaries>
            <misc:Ver x:Key="version" SrcType="{x:Type local:PgMenu}"/>
            <ut:DownBlowingSystemServiceUt x:Key="viewModel"/>
        </ResourceDictionary>
    </Page.Resources>
    <Grid d:DataContext="{StaticResource viewModel}">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="540*" />
        </Grid.RowDefinitions>

        <StackPanel Orientation="Horizontal">
            <Button Style="{StaticResource ButtonStyle_back}" Command="BrowseBack"/>
        </StackPanel>
        <StackPanel Orientation="Horizontal" FlowDirection="RightToLeft">
            <StackPanel Orientation="Vertical" DataContext="{StaticResource version}">
                <Button Style="{StaticResource ButtonStyle_empty}" Background="{x:Null}" VerticalAlignment="Center">
                    <TextBlock Text="{Binding .}" FontSize="24" FontWeight="Bold" Margin="15" />
                </Button>
            </StackPanel>
        </StackPanel>
        <ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Disabled" HorizontalScrollBarVisibility="Auto">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="100" />
                    <ColumnDefinition />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>

                    <RowDefinition />
                    <RowDefinition Height="100" />
                </Grid.RowDefinitions>
                <WrapPanel Orientation="Vertical" Grid.Column="1">
                    <WrapPanel.Resources>
                        <Style TargetType="Button" BasedOn="{StaticResource ResourceKey=ButtonStyle_empty}">
                            <Setter Property="Background" Value="#FF0083D7"/>
                            <Setter Property="Width" Value="225"/>
                            <Setter Property="Height" Value="140"/>
                            <Setter Property="Margin" Value="5"/>
                            <Style.Resources>
                                <Style TargetType="TextBlock">
                                    <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="Padding" Value="10,0"/>
                                </Style>
                            </Style.Resources>
                        </Style>
                    </WrapPanel.Resources>
                    <Button Click="button_system_Click" >
                        <TextBlock Text="IBC参数"/>
                    </Button>
                    
                    <Button Click="button_error_Click" Background="Red" >
                        <TextBlock Text="报警管理"/>
                    </Button>

                    <ItemsControl ItemsSource="{Binding TAreas}" >
                        <ItemsControl.ItemsPanel>
                            <ItemsPanelTemplate>
                                <WrapPanel Orientation="Vertical" />
                            </ItemsPanelTemplate>
                        </ItemsControl.ItemsPanel>
                        <ItemsControl.ItemTemplate>
                            <DataTemplate>
                                <Button Click="btnTAreaClick" Tag="{Binding .}" >
                                    <Grid SnapsToDevicePixels="true" Margin="10,0">
                                        <TextBlock FontWeight="Bold"  VerticalAlignment="Center">
                                            <Run Text="{Binding Number}" /><Run Text="区加热" />
                                        </TextBlock>
                                    </Grid>
                                </Button>
                            </DataTemplate>
                        </ItemsControl.ItemTemplate>
                    </ItemsControl>
                </WrapPanel>
            </Grid>
        </ScrollViewer>


    </Grid>
</Page>