开发者

How to use a system color in a lineargradientbrush in wpf

开发者 https://www.devze.com 2023-01-10 03:11 出处:网络
I have a gradient background for my window <Window.Background> <LinearGradientBrush StartPoint=\"0,0\" EndPoint=\"0,1\">

I have a gradient background for my window

<Window.Background>
        <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
            <GradientStop Offset="0" Color="White" />
            <GradientStop Offset="0" Color="Black" />
        </LinearGradientBrush>
    <开发者_开发知识库;/Window.Background>

I would like to replace the black gradient stop with the system color for control faces (the color buttons and dialog boxes are by default)

Whats the syntax?


You can specify a Color through the static-extension:

<GradientStop Offset="0" Color="{x:Static SystemColors.ActiveBorderColor}" />
0

精彩评论

暂无评论...
验证码 换一张
取 消