You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

153 lines
9.0 KiB

<Window x:Class="SUNLIGHT_Audit.git.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:SUNLIGHT_Audit.git"
mc:Ignorable="d"
Background="#FFF5F5F5"
Title="" Height="900" Width="1280" WindowStartupLocation="CenterScreen">
<!--隐藏标题栏-->
<WindowChrome.WindowChrome>
<WindowChrome CaptionHeight="30" UseAeroCaptionButtons="False"></WindowChrome>
</WindowChrome.WindowChrome>
<!--模板-->
<Window.Resources>
4 years ago
<!--工具栏模板-->
<Style x:Key="RadioButtonStyle" TargetType="{x:Type RadioButton}">
<Setter Property="FocusVisualStyle" Value="{DynamicResource {x:Static SystemParameters.FocusVisualStyleKey}}"/>
<Setter Property="HorizontalContentAlignment" Value="Left"/>
<Setter Property="OverridesDefaultStyle" Value="True"/>
<Setter Property="Padding" Value="6 0 0 0"/>
<Setter Property="SnapsToDevicePixels" Value="True"/>
<Setter Property="Stylus.IsPressAndHoldEnabled" Value="False"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type RadioButton}">
<Grid>
<Border x:Name="border" Background="{TemplateBinding Background}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition>
</ColumnDefinition>
</Grid.ColumnDefinitions>
<TextBlock Grid.Row="0" Grid.Column="0"
Text="{TemplateBinding Tag}"
FontFamily="Fonts/#FontAwesome"
HorizontalAlignment="Left"
Width="40" FontSize="30" Margin="10,10,0,0"/>
<TextBlock Grid.Row="0" Grid.Column="1"
Text="{TemplateBinding Content}"
FontFamily="Fonts/#FontAwesome"
HorizontalAlignment="Center"
Width="60" FontSize="30" Margin="10,10,0,0"/>
</Grid>
</Border>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#FFA0A0A0" TargetName="border"/>
</Trigger>
<Trigger Property="IsChecked" Value="True">
<Setter Property="Background" Value="#FFF5F5F5" TargetName="border"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="Style" TargetType="{x:Type RadioButton}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type RadioButton}">
<Grid>
<Border x:Name="border" Background="{TemplateBinding Background}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition>
</ColumnDefinition>
</Grid.ColumnDefinitions>
<TextBlock Grid.Row="0" Grid.Column="0"
Text="{TemplateBinding Tag}"
FontFamily="Fonts/#FontAwesome"
HorizontalAlignment="Left"
Width="40" FontSize="30" Margin="10,10,0,0"/>
<TextBlock Grid.Row="0" Grid.Column="1"
Text="{TemplateBinding Content}"
FontFamily="Fonts/#FontAwesome"
HorizontalAlignment="Center"
Width="60" FontSize="30" Margin="10,10,0,0"/>
</Grid>
</Border>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#FFA0A0A0" TargetName="border"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
4 years ago
<!--按钮模板-->
<Style x:Key="Button_Menu" TargetType="{x:Type Button}">
<Setter Property="Width" Value="24" />
<Setter Property="Height" Value="24" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="Foreground" Value="Black"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border x:Name="MyBackgroundElement" BorderBrush="{x:Null}" BorderThickness="0">
<ContentPresenter x:Name="ButtonContentPresenter" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="MyBackgroundElement" Property="Background" Value="#FFFFFFFF"/>
<Setter TargetName="MyBackgroundElement" Property="Opacity" Value="0.7"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="Cursor" Value="Hand" />
</Style>
</Window.Resources>
<Grid>
<!--工具栏-->
<Rectangle HorizontalAlignment="Left" Width="140" Fill="#FFCCCCCC"/>
<!--工具选项-->
<RadioButton Content="查询" Tag="&#xF15C;" HorizontalAlignment="Left" Height="55" Margin="0,190,0,0" VerticalAlignment="Top" Width="140" Background="#FFCCCCCC" Style="{DynamicResource RadioButtonStyle}" Checked="RadioButton_Checked"/>
<RadioButton Content="统计" Tag="&#xf080;" HorizontalAlignment="Left" Height="55" Margin="0,245,0,0" VerticalAlignment="Top" Width="140" Background="#FFCCCCCC" Style="{DynamicResource RadioButtonStyle}" Checked="RadioButton_Checked"/>
<RadioButton Content="原料" Tag="&#xF00B;" HorizontalAlignment="Left" Height="55" Margin="0,300,0,0" VerticalAlignment="Top" Width="140" Background="#FFCCCCCC" Style="{DynamicResource RadioButtonStyle}" Checked="RadioButton_Checked"/>
<RadioButton Content="退出" Tag="&#xF08B;" HorizontalAlignment="Left" Height="55" Margin="0,0,0,5" VerticalAlignment="Bottom" Width="140" Background="#FFCCCCCC" Style="{DynamicResource Style}" Checked="Exit" />
<RadioButton Content="信息" Tag="&#xF0B1;" HorizontalAlignment="Left" Height="55" Margin="0,0,0,60" VerticalAlignment="Bottom" Width="140" Background="#FFCCCCCC" Style="{DynamicResource Style}" Checked="Help" />
<!--LOGO-->
<Rectangle HorizontalAlignment="Left" Height="120" Margin="10,10,0,0" VerticalAlignment="Top" Width="120">
<Rectangle.Fill>
<ImageBrush ImageSource="/Logo/sunlight_sc.png"/>
</Rectangle.Fill>
</Rectangle>
<!--自定义标题栏-->
<Border HorizontalAlignment="Stretch" Height="35" Margin="140,0,0,0" VerticalAlignment="Top" Background="#FFE6E6E6" />
<Button Style="{StaticResource Button_Menu}" Content="➖" HorizontalAlignment="Right" Height="35" Margin="0,0,0,0" VerticalAlignment="Top" Width="40" Click="Button_Click" Background="{x:Null}" BorderBrush="{x:Null}" Foreground="#FF100F0F"
BorderThickness="0,0,0,0" FontSize="24" OpacityMask="#FFA4A4A4" WindowChrome.IsHitTestVisibleInChrome="True" VerticalContentAlignment="Center" Padding="0,0,0,0" FontWeight="Bold" FontStyle="Normal" Cursor="Hand"/>
<!--用户窗体-->
<Grid Grid.ColumnSpan="2">
<ContentControl x:Name="container" Margin="140,0,0,0">
</ContentControl>
</Grid>
</Grid>
</Window>