<My:MWindow  xmlns:My="clr-namespace:MyWPFControl.Controls;assembly=MyWPFControl"
                   x:Class="B20UVLog.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:B20UVLog" xmlns:viewmodels="clr-namespace:B20UVLog.ViewModels"
             mc:Ignorable="d"
        Title="UV Log" Height="960" Width="1800"
             WindowState="Maximized">
    <Window.DataContext>
        <viewmodels:MainWindowViewModel/>
    </Window.DataContext>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="auto"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="auto"/>
        </Grid.RowDefinitions>
        <Menu Grid.Row="0">
            <MenuItem Header="基础配置">
                <MenuItem.Icon>
                    <TextBlock Text="{DynamicResource Icon-cog}" Style="{DynamicResource IconStyle}"/>
                </MenuItem.Icon>
                <MenuItem Header="数据库配置" Command="{Binding MenuItemClickCommand}" CommandParameter="db"/>
                <MenuItem Header="PLC配置" Command="{Binding MenuItemClickCommand}" CommandParameter="plc"/>
                <MenuItem Header="字典配置" Command="{Binding MenuItemClickCommand}" CommandParameter="dict"/>
            </MenuItem>
            <MenuItem Header="关于">
                <MenuItem.Icon>
                    <TextBlock Text="{DynamicResource Icon-question-circle}" Style="{DynamicResource IconStyle}"/>
                </MenuItem.Icon></MenuItem>
        </Menu>
        <Grid Grid.Row="1">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="200"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid Grid.Column="1">
                <Frame x:Name="FrameContent" NavigationUIVisibility="Hidden" Margin="10" Source="Pages/AxisData.xaml"></Frame>
            </Grid>
            <TreeView Grid.Column="0" SelectedItemChanged="TreeView_SelectedItemChanged">
                <My:MTreeViewItem Header="Axis Data" IsSelected="True"></My:MTreeViewItem>
                <My:MTreeViewItem Header="Servo Axis Status"></My:MTreeViewItem>
                <My:MTreeViewItem Header="Glass Information"></My:MTreeViewItem>
                <My:MTreeViewItem Header="Lamp Use Time"></My:MTreeViewItem>
                <My:MTreeViewItem Header="Recipe Body"></My:MTreeViewItem>
                <My:MTreeViewItem Header="SYS Para"></My:MTreeViewItem>
                <My:MTreeViewItem Header="Robot Interface In"></My:MTreeViewItem>
                <My:MTreeViewItem Header="Robot Interface Out"></My:MTreeViewItem>
                <My:MTreeViewItem Header="Y Measure Data"></My:MTreeViewItem>
                <My:MTreeViewItem Header="EQP Status"></My:MTreeViewItem>
                <My:MTreeViewItem Header="Recipe Count"></My:MTreeViewItem>
                <My:MTreeViewItem Header="ANALog Data"></My:MTreeViewItem>
                <My:MTreeViewItem Header="Lamp Data"></My:MTreeViewItem>
                <My:MTreeViewItem Header="Alarm And Warning"></My:MTreeViewItem>
                <My:MTreeViewItem Header="IO"></My:MTreeViewItem>
            </TreeView>
        </Grid>
        <StackPanel Grid.Row="2" Orientation="Horizontal" IsHitTestVisible="False">
            <My:MCheckBox IsChecked="{Binding PLCStatus}">PLC连接状态</My:MCheckBox>
            <My:MCheckBox IsChecked="{Binding DBStatus}">数据库连接状态</My:MCheckBox>
        </StackPanel>
    </Grid>
</My:MWindow>
