1 Star 1 Fork 0

jiaqiang.Li/WPF-Display-Demo

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
App.xaml 2.73 KB
一键复制 编辑 原始数据 按行查看 历史
D37_lijiaqiang 提交于 2023-09-28 16:58 . add teacher students info
<prism:PrismApplication
x:Class="DisplayDemoApp.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:DisplayDemoApp"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:prism="http://prismlibrary.com/">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<materialDesign:BundledTheme
BaseTheme="Light"
PrimaryColor="DeepPurple"
SecondaryColor="LightGreen" />
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml" />
</ResourceDictionary.MergedDictionaries>
<Style x:Key="McListBoxItemStyle" TargetType="ListBoxItem">
<Setter Property="MinHeight" Value="35" />
<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 VerticalContentAlignment}" />
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter TargetName="borderHeader" Property="BorderThickness" Value="4,0,0,0" />
<Setter TargetName="borderHeader" Property="BorderBrush" Value="{DynamicResource PrimaryHueLightBrush}" />
<Setter TargetName="border" Property="Background" Value="{DynamicResource PrimaryHueLightBrush}" />
<Setter TargetName="border" Property="Opacity" Value="0.2" />
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="border" Property="Background" Value="{DynamicResource PrimaryHueLightBrush}" />
<Setter TargetName="border" Property="Opacity" Value="0.2" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
</Application.Resources>
</prism:PrismApplication>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C#
1
https://gitee.com/jiaqiangli/wpf-display-demo.git
git@gitee.com:jiaqiangli/wpf-display-demo.git
jiaqiangli
wpf-display-demo
WPF-Display-Demo
master

搜索帮助