|
- <Window x:Class="BPASmart.RecipeManagement.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:BPASmart.RecipeManagement"
- xmlns:view="clr-namespace:BPASmart.RecipeManagement.View"
- xmlns:vm="clr-namespace:BPASmart.RecipeManagement.ViewModel"
- mc:Ignorable="d"
- Title="MainWindow" Height="900" Width="1400" WindowStyle="None" WindowStartupLocation="CenterScreen">
- <Window.DataContext>
- <vm:MainWindowViewModel/>
- </Window.DataContext>
- <Window.Resources>
- <Style x:Key="RadioNavigation" TargetType="RadioButton">
- <Setter Property="Margin" Value="-4,10"/>
- <Setter Property="Background" Value="Transparent"/>
- <Setter Property="GroupName" Value="Navigation"/>
- <Setter Property="VerticalAlignment" Value="Center"/>
- <Setter Property="HorizontalAlignment" Value="Center"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="RadioButton">
- <Grid Background="{TemplateBinding Background}" Margin="{TemplateBinding Margin}">
- <Border x:Name="_borderOver" Background="Transparent" Width="200" BorderBrush="Transparent" BorderThickness="0,1">
- <TextBlock Foreground="White" Text="{TemplateBinding Content}" FontSize="24" Background="Transparent"
- VerticalAlignment="Center" HorizontalAlignment="Center"/>
- </Border>
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter Property="Background" TargetName="_borderOver" Value="#1971B6"/>
- </Trigger>
- <Trigger Property="IsChecked" Value="True">
- <Setter Property="BorderBrush" TargetName="_borderOver" Value="White"/>
- <Setter Property="BorderThickness" TargetName="_borderOver" Value="0,1"/>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style x:Key="ButtonNavigation" TargetType="Button">
- <Setter Property="Height" Value="40"/>
- <Setter Property="Foreground" Value="White"/>
- <Setter Property="FontSize" Value="20"/>
- <Setter Property="VerticalAlignment" Value="Center"/>
- <Setter Property="Background" Value="Transparent"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="Button">
- <Grid Background="{TemplateBinding Background}" Margin="{TemplateBinding Margin}">
- <Border x:Name="_borderOver" Background="Transparent" Width="200" BorderBrush="Transparent" BorderThickness="0,1">
- <TextBlock Foreground="White" Text="{TemplateBinding Content}" FontSize="24" Background="Transparent"
- VerticalAlignment="Center" HorizontalAlignment="Center"/>
- </Border>
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter Property="Background" TargetName="_borderOver" Value="#1971B6"/>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- </Window.Resources>
- <Border Background="Transparent">
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="200"/>
- <ColumnDefinition Width="*"/>
- <ColumnDefinition Width="2"/>
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition Height="10"/>
- <RowDefinition Height="*"/>
- <RowDefinition Height="60"/>
- </Grid.RowDefinitions>
-
- <StackPanel x:Name="mylistview" Background="#2196F3" Grid.RowSpan="2"
- ScrollViewer.VerticalScrollBarVisibility="Hidden" ScrollViewer.HorizontalScrollBarVisibility="Hidden"
- MouseDown="mylistview_MouseDown" >
- <RadioButton Content="订单管理" Style="{DynamicResource RadioNavigation}" IsChecked="True"
- Click="NavButton_Click" Tag="OrderManager"/>
- <RadioButton Content="配方管理" Style="{DynamicResource RadioNavigation}"
- Click="NavButton_Click" Tag="RecipeManager"/>
- <RadioButton Content="原料管理" Style="{DynamicResource RadioNavigation}"
- Click="NavButton_Click" Tag="MaterialManager"/>
- <RadioButton Content="工艺参数" Style="{DynamicResource RadioNavigation}"
- Click="NavButton_Click" Tag="TechnologySetting"/>
- <RadioButton Content="权限分配" Style="{DynamicResource RadioNavigation}"
- Click="NavButton_Click" Tag="PowerManager"/>
- </StackPanel>
- <Border Background="#2196F3" Grid.Row="2">
- <Button Content="退出"
- Style="{DynamicResource ButtonNavigation}"
- Click="Button_Click">
-
- </Button>
- </Border>
- <ContentControl x:Name="contentRegion" Grid.Column="1" Grid.Row="1" >
- <view:PowerManager/>
- </ContentControl>
- </Grid>
- </Border>
- </Window>
|