|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144 |
- <Window x:Class="BPASmartClient.MilkWithTea.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:BPASmartClient.MilkWithTea.View"
- xmlns:control="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource"
- xmlns:vm ="clr-namespace:BPASmartClient.MilkWithTea.ViewModel"
- mc:Ignorable="d"
- Title="MainWindow" Height="1000" Width="1600" WindowStyle="None" AllowsTransparency="True" Background="Transparent" WindowStartupLocation="CenterScreen">
- <Window.DataContext>
- <vm:MainWindowVeiwModel/>
- </Window.DataContext>
- <Window.Resources>
-
- <Style x:Key="menuButtonTemplate" TargetType="{x:Type Button}">
- <Setter Property="Focusable" Value="False"/>
- <Setter Property="Background" Value="Transparent"/>
- <Setter Property="BorderBrush" Value="Transparent"/>
- <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
- <Setter Property="BorderThickness" Value="1"/>
- <Setter Property="HorizontalContentAlignment" Value="Center"/>
- <Setter Property="VerticalContentAlignment" Value="Center"/>
- <Setter Property="Padding" Value="1"/>
- <Setter Property="FontSize" Value="20"/>
- <Setter Property="Foreground" Value="AliceBlue"/>
- <Setter Property="Margin" Value="0,20"/>
- <Setter Property="FontFamily" Value="/BPASmartClient.CustomResource;component/Fonts/MT/#iconfont"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type Button}" >
- <Border x:Name="border" CornerRadius="10" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
- <ContentPresenter x:Name="contentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsDefaulted" Value="True">
- <Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
- </Trigger>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter Property="Background" TargetName="border" Value="#63BCFB"/>
- <Setter Property="BorderBrush" TargetName="border" Value="#63BCFB"/>
- </Trigger>
- <Trigger Property="IsPressed" Value="True">
- <Setter Property="Background" TargetName="border" Value="#63BCFB"/>
- <Setter Property="BorderBrush" TargetName="border" Value="#63BCFB"/>
- </Trigger>
- <Trigger Property="ToggleButton.IsChecked" Value="True">
- <Setter Property="Background" TargetName="border" Value="#FFBCDDEE"/>
- <Setter Property="BorderBrush" TargetName="border" Value="#FF245A83"/>
- </Trigger>
- <Trigger Property="IsEnabled" Value="False">
- <Setter Property="Background" TargetName="border" Value="#FFF4F4F4"/>
- <Setter Property="BorderBrush" TargetName="border" Value="#FFADB2B5"/>
- <Setter Property="Foreground" Value="#FF838383"/>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
-
- </Setter.Value>
-
- </Setter>
-
- </Style>
- </Window.Resources>
- <Border Background="#FF37A0EA" CornerRadius="20" BorderThickness="0">
- <Grid Background="Transparent">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="120"/>
- <ColumnDefinition Width="*"/>
-
- </Grid.ColumnDefinitions >
- <Grid.RowDefinitions >
- <RowDefinition Height="67"/>
- <RowDefinition />
- </Grid.RowDefinitions>
-
-
- <Grid Grid.RowSpan="3" MouseDown="Grid_MouseDown">
-
- <Grid.RowDefinitions>
- <RowDefinition Height="20"/>
- <RowDefinition Height="150"/>
- <RowDefinition Height="80"/>
- <RowDefinition Height="80"/>
- <RowDefinition Height="80"/>
- <RowDefinition Height="80"/>
- <RowDefinition Height="*"/>
- <RowDefinition Height="40"/>
- <RowDefinition Height="60"/>
- <RowDefinition Height="80"/>
- <RowDefinition Height="20"/>
- </Grid.RowDefinitions>
- <StackPanel Grid.Row="1" Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center" Height="76" Width="114">
- <TextBlock Text="奶茶" FontSize="38" FontFamily="/BPASmartClient.CustomResource;component/Fonts/#zihun80hao-mengquxiaoyuti" HorizontalAlignment="Center"/>
- <TextBlock Text="味魔方" FontSize="38" FontFamily="/BPASmartClient.CustomResource;component/Fonts/#zihun80hao-mengquxiaoyuti"/>
- </StackPanel>
- <Button Grid.Row="2" Style="{StaticResource menuButtonTemplate}" Click="NavButton_Click" Tag="MainControlView" Margin="0,20,0,20">
- <StackPanel Orientation="Horizontal">
- <TextBlock Text="" Margin="5,0"/>
- <TextBlock Text="主页"/>
- </StackPanel>
-
- </Button>
- <Button Grid.Row="3" Style="{StaticResource menuButtonTemplate}" Click="NavButton_Click" Tag="MessageLogInfo" Margin="0,20,0,20">
- <StackPanel Orientation="Horizontal">
- <TextBlock Text="" Margin="5,0"/>
- <TextBlock Text="日志"/>
- </StackPanel>
- </Button>
- <Button Grid.Row="4" Style="{StaticResource menuButtonTemplate}" Click="NavButton_Click" Tag="LocalConfigureView" Margin="0,20,0,20">
- <StackPanel Orientation="Horizontal">
- <TextBlock Text="" Margin="5,0"/>
- <TextBlock Text="配置"/>
- </StackPanel>
- </Button>
- <Button Grid.Row="5" Style="{StaticResource menuButtonTemplate}" Click="NavButton_Click" Tag="ParameterSetting" Margin="0,20,0,20">
- <StackPanel Orientation="Horizontal">
- <TextBlock Text="" Margin="5,0"/>
- <TextBlock Text="参数"/>
- </StackPanel>
- </Button>
- <control:DateTimeUI Grid.Row="8" HorizontalContentAlignment="Center" />
- <Button Grid.Row="9" Style="{StaticResource menuButtonTemplate}" Click="CloseButton_Click" Margin="0,20,0,20">
- <StackPanel Orientation="Horizontal">
- <TextBlock Text="" Margin="5,0"/>
- <TextBlock Text="退出"/>
- </StackPanel>
- </Button>
- <CheckBox Content="开机自启" Grid.Row="7" Foreground="White" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="16,0"
- IsChecked="{Binding AutoStart}"/>
- </Grid>
- <Border Grid.Column="1" Grid.RowSpan="3" Background="Transparent">
- <Border Background="White" CornerRadius="20" BorderThickness="0" >
- <Grid>
- <ContentControl x:Name="contentRegion">
-
- <local:MessageLogInfo/>
- </ContentControl>
- </Grid>
- </Border>
- </Border>
- </Grid>
- </Border>
- </Window>
|