"XAML provides an easy way to set values of properties—type converters and the extended property syntax allow for flexible setting of values. However, some things cannot be expressed as a simple value, such as setting a property to the value of some static property."

这个相对比较简单,知道就行,Code Snip如下:

    <StackPanel>
        <Ellipse Stroke="Black" Height="50" Fill="{x:Static SystemColors.DesktopBrush}"/>
        <Rectangle Stroke="Black" Height="50" Fill="{x:Static SystemColors.ActiveCaptionBrush}"/>
    </StackPanel>

请对比:WPF整理-使用用户选择主题的颜色和字体 ,区别两者的不同点。

相关文章:

  • 2021-06-26
  • 2021-11-10
  • 2022-12-23
  • 2021-08-22
  • 2021-04-02
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-07-18
  • 2021-08-09
  • 2021-11-07
  • 2021-06-06
相关资源
相似解决方案