Files
FT479/WPFWCSDemo/App.xaml
2026-06-29 14:46:32 +08:00

96 lines
5.2 KiB
XML

<Application x:Class="WPFWCSDemo.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:WPFWCSDemo"
xmlns:md="http://materialdesigninxaml.net/winfx/xaml/themes"
StartupUri="MainWindow.xaml">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<md:BundledTheme BaseTheme="Light" PrimaryColor="DeepPurple" SecondaryColor="Lime"/>
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml"/>
</ResourceDictionary.MergedDictionaries>
<!--页面标题-->
<Style x:Key="screenTitle" TargetType="TextBlock">
<Setter Property="FontSize" Value="30"/>
<Setter Property="FontWeight" Value="Bold"/>
<Setter Property="Margin" Value="10,5"/>
</Style>
<!--////////////////////图例/////////////////////-->
<!--文本-->
<Style x:Key="standardSymbolText" TargetType="TextBlock">
<Setter Property="FontSize" Value="13"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="Margin" Value="5,0,15,0"/>
</Style>
<!--图形-->
<Style x:Key="standardSymbolRectangle" TargetType="Rectangle">
<Setter Property="Stroke" Value="Black"/>
<Setter Property="StrokeThickness" Value="2"/>
<Setter Property="Height" Value="18"/>
<Setter Property="Width" Value="18"/>
<Setter Property="Margin" Value="5,0,5,0"/>
</Style>
<!--主画面-左侧弹出导航栏-->
<Style TargetType="ListBoxItem" x:Key="myListBoxItemStyle">
<Setter Property="FontSize" Value="15"/>
<Setter Property="MinHeight" Value="40"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListBoxItem}">
<Grid>
<!--设置选中后的边框名称-->
<Border x:Name="borderHeader"/>
<!--选中后的名称-->
<Border x:Name="border"/>
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalAlignment}" VerticalAlignment="{TemplateBinding VerticalAlignment}"/>
</Grid>
<!--悬停/选中动作触发器-->
<ControlTemplate.Triggers>
<!--鼠标悬停-->
<Trigger Property="IsMouseOver" Value="True">
<!--悬停颜色-->
<Setter Property="Background" Value="{DynamicResource PrimaryHueLightBrush}" TargetName="border"/>
<!--透明度-->
<Setter Property="Opacity" Value="0.3" TargetName="border"/>
</Trigger>
<!--鼠标选中-->
<Trigger Property="IsSelected" Value="True">
<!--只显示左侧竖线作为选中标识-->
<Setter Property="BorderThickness" Value="4 0 0 0" TargetName="borderHeader"/>
<!--竖线颜色-->
<Setter Property="BorderBrush" Value="{DynamicResource PrimaryHueDarkBrush}" TargetName="borderHeader"/>
<!--边距-->
<Setter Property="Margin" Value="3" TargetName="borderHeader"/>
<!--选中颜色-->
<Setter Property="Background" Value="{DynamicResource PrimaryHueLightBrush}" TargetName="border"/>
<!--选中透明度-->
<Setter Property="Opacity" Value="0.5" TargetName="border"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!--报表样式-->
<!--列标题样式-->
<Style x:Key="defaultDataGridStyle" TargetType="DataGridColumnHeader">
<Setter Property="FontSize" Value="16"/>
<Setter Property="MinWidth" Value="100"/>
<Setter Property="Height" Value="30"/>
</Style>
<!--表格样式-->
<Style x:Key="defaultDataGridTextStyle" TargetType="DataGridCell">
<Setter Property="FontSize" Value="16"/>
<Setter Property="MinWidth" Value="100"/>
<Setter Property="Height" Value="30"/>
</Style>
</ResourceDictionary>
</Application.Resources>
</Application>