开发者

Override Default Aero Theme

I'm using the aero theme in my application which changes all my default styles of the controls. I figured creating a style with no x:Key would override the default aero style but it does not. Any suggestions?

<Style TargetType="{x:Type ScrollBar}">
<Setter Property="Background" Value="#ff007eb1"/>
<Setter Property="BorderBrush" Value="Transparent"/>
<Style.Triggers>
    <Trigger Property="Orientation" Value="Vertical">
        <Setter Property="Width" Value="5"/>
        <Setter Property="Height" Value="Auto" />
        <Setter Property="Template" Value="{StaticResource VerticalScrollBar}" />
    </Trigger>
    <Trigger Property="Orientation" Value="Horizontal">
        <Setter Property="Width" Value="Auto"/>
        <Setter Property="Height" Value="5" />
        <Setter Property="Template" Value="{StaticReso开发者_JS百科urce HorizontalScrollBar}" />
    </Trigger>
</Style.Triggers>      


Some properties of the Aero style will only change if you replace the complete controltemplate of a control. A style will not change everything.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜