WPF整理-XAML訪問靜態屬性

"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."html

這個相對比較簡單,知道就行,Code Snip以下:express

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

請對比:WPF整理-使用用戶選擇主題的顏色和字體 ,區別二者的不一樣點。ide

相關文章
相關標籤/搜索