【发布时间】:2022-01-06 11:45:19
【问题描述】:
我正在尝试使用 Windows 11 主题颜色创建 SolidColorBrush。
我可以直接使用 Windows 11 的主题颜色,但无法创建 SolidColorBrush。
<!-- This works: -->
<Style TargetType="{x:Type ProgressBar}">
<Setter Property="Foreground"
Value="{x:Static SystemParameters.WindowGlassBrush}"/>
</Style>
<!-- This does not work: -->
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightColor}" Color="Red"/>
有什么想法吗?
【问题讨论】: