|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176 |
- <UserControl x:Class="BPASmart.RecipeManagement.MainControl"
- 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:BPASmart.RecipeManagement"
- xmlns:view="clr-namespace:BPASmart.RecipeManagement.View"
- xmlns:vm="clr-namespace:BPASmart.RecipeManagement.ViewModel"
- mc:Ignorable="d"
- d:DesignHeight="800" d:DesignWidth="1400">
- <UserControl.DataContext>
- <vm:MainControl/>
- </UserControl.DataContext>
- <UserControl.Resources>
- <Style x:Key="RadioNavigation" TargetType="RadioButton">
- <Setter Property="Margin" Value="-4,0"/>
- <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">
- <Border x:Name="_borderOver" Background="Transparent" Width="200" BorderBrush="Transparent" BorderThickness="0,1">
- <Grid Background="{TemplateBinding Background}" Margin="{TemplateBinding Margin}">
-
- <TextBlock Foreground="White" Text="{TemplateBinding Content}" FontSize="24" Background="Transparent"
- VerticalAlignment="Center" HorizontalAlignment="Center"/>
-
- </Grid>
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter Property="BorderBrush" TargetName="_borderOver" Value="#1971B6"/>
- <Setter Property="Background" TargetName="_borderOver">
- <Setter.Value>
- <LinearGradientBrush StartPoint="0,1" EndPoint="1,1">
- <GradientStop Color="#104E8B" Offset="0"/>
- <GradientStop Color="#1874CD" Offset="0.4"/>
- <GradientStop Color="#1874CD" Offset="0.6"/>
- <GradientStop Color="#27408B" Offset="1"/>
- </LinearGradientBrush>
- </Setter.Value>
- </Setter>
- </Trigger>
- <Trigger Property="IsChecked" Value="True">
-
- <Setter Property="Background" TargetName="_borderOver" >
- <Setter.Value>
- <ImageBrush ImageSource="../Image/leftImage.png"/>
- </Setter.Value>
- </Setter>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <ControlTemplate x:Key="butonTempalte" TargetType="RadioButton">
- <Border x:Name="_borderOver" Background="Transparent" Width="200" Height="60" BorderBrush="Transparent" BorderThickness="0,1">
- <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter Property="BorderBrush" TargetName="_borderOver" Value="#1971B6"/>
- <Setter Property="Background" TargetName="_borderOver">
- <Setter.Value>
- <LinearGradientBrush StartPoint="0,1" EndPoint="1,1">
- <GradientStop Color="#104E8B" Offset="0"/>
- <GradientStop Color="#1874CD" Offset="0.4"/>
- <GradientStop Color="#1874CD" Offset="0.6"/>
- <GradientStop Color="#27408B" Offset="1"/>
- </LinearGradientBrush>
- </Setter.Value>
- </Setter>
- </Trigger>
- <Trigger Property="IsChecked" Value="True">
-
- <Setter Property="Background" TargetName="_borderOver" >
- <Setter.Value>
- <ImageBrush ImageSource="../Image/leftImage.png"/>
- </Setter.Value>
- </Setter>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- <Style x:Key="fonticon" TargetType="{x:Type TextBlock}">
- <Setter Property="FontFamily" Value="pack://application:,,,/Font/#iconfont"/>
- <Setter Property="FontSize" Value="24"/>
- <Setter Property="Foreground" Value="White"/>
- <Setter Property="HorizontalAlignment" Value="Center"/>
- <Setter Property="VerticalAlignment" Value="Center"/>
- <Setter Property="Margin" Value="0,0,20,0"/>
-
-
- </Style>
- </UserControl.Resources>
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*"/>
- <ColumnDefinition Width="6*"/>
- </Grid.ColumnDefinitions>
- <Border Grid.Row="1" Grid.RowSpan="2" BorderBrush="#1E90FF" BorderThickness="0,0,2,0">
- <Border.Background>
- <LinearGradientBrush StartPoint="0,1" EndPoint="1,1">
- <GradientStop Color="#01003B" Offset="0.2"/>
-
- <GradientStop Color="#010050" Offset="1"/>
- </LinearGradientBrush>
- </Border.Background>
- </Border>
- <StackPanel x:Name="mylistview" Background="Transparent" Grid.RowSpan="1" Grid.Row="1"
- ScrollViewer.VerticalScrollBarVisibility="Hidden" ScrollViewer.HorizontalScrollBarVisibility="Hidden"
- MouseLeftButtonDown="mylistview_MouseDown" >
- <RadioButton Style="{DynamicResource RadioNavigation}" IsChecked="True" Template="{DynamicResource butonTempalte }"
- Click="NavButton_Click" Tag="OrderManager">
- <Grid Background="Transparent" >
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="auto"/>
- <ColumnDefinition Width="*"/>
- </Grid.ColumnDefinitions>
- <TextBlock Text="" Style="{DynamicResource fonticon}"/>
- <TextBlock Grid.Column="1" Foreground="White" Text="订单管理" FontSize="24" Background="Transparent"
- VerticalAlignment="Center" HorizontalAlignment="Center" FontFamily="楷体"/>
-
- </Grid>
- </RadioButton>
- <RadioButton Style="{DynamicResource RadioNavigation}" Template="{DynamicResource butonTempalte }"
- Click="NavButton_Click" Tag="RecipeManager">
- <Grid Background="Transparent" >
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="auto"/>
- <ColumnDefinition Width="*"/>
- </Grid.ColumnDefinitions>
- <TextBlock Text="" Style="{DynamicResource fonticon}"/>
- <TextBlock Grid.Column="1" Foreground="White" Text="配方管理" FontSize="24" Background="Transparent"
- VerticalAlignment="Center" HorizontalAlignment="Center" FontFamily="楷体"/>
-
- </Grid>
- </RadioButton>
- <RadioButton Style="{DynamicResource RadioNavigation}" Template="{DynamicResource butonTempalte }"
- Click="NavButton_Click" Tag="MaterialManager">
- <Grid Background="Transparent" >
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="auto"/>
- <ColumnDefinition Width="*"/>
- </Grid.ColumnDefinitions>
- <TextBlock Text="" Style="{DynamicResource fonticon}"/>
- <TextBlock Grid.Column="1" Foreground="White" Text="原料管理" FontSize="24" Background="Transparent"
- VerticalAlignment="Center" HorizontalAlignment="Center" FontFamily="楷体"/>
-
- </Grid>
- </RadioButton>
-
- <RadioButton Style="{DynamicResource RadioNavigation}" Template="{DynamicResource butonTempalte }"
- Click="NavButton_Click" Tag="PowerManager">
- <Grid Background="Transparent" >
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="auto"/>
- <ColumnDefinition Width="*"/>
- </Grid.ColumnDefinitions>
- <TextBlock Text="" Style="{DynamicResource fonticon}"/>
- <TextBlock Grid.Column="1" Foreground="White" Text="权限分配" FontSize="24" Background="Transparent"
- VerticalAlignment="Center" HorizontalAlignment="Center" FontFamily="楷体"/>
-
- </Grid>
- </RadioButton>
- </StackPanel>
-
-
-
- <ContentControl x:Name="contentRegion" Grid.Column="1" Grid.Row="1" Background="#01003B" BorderBrush="Transparent">
- <view:OrderManager/>
- </ContentControl>
- </Grid>
- </UserControl>
|