开发者

Style of Controle At various Event

Coul开发者_JS百科d anyone tell what would be the style of the Label or Button at various event shows in the below image.

1. MouseOver

Style of Controle At various Event

2 MousePressed and Control Selected

Style of Controle At various Event


You can have a look at Style triggers. To figure out what properties you need you can have a look at the UIElement.

For example it can be something like:

<Style x:Key="Triggers" TargetType="Button">
    <Style.Triggers>
    <Trigger Property="IsPressed" Value="true">
        <Setter Property = "Background" Value="LightGray"/>
    </Trigger>
    <Trigger Property="IsMouseOver" Value="true">
        <Setter Property = "BorderBrush" Value="Blue"/>
    </Trigger>
    <Trigger Property="IsFocused" Value="true">
        <Setter Property = "BorderBrush" Value="LightGray"/>
    </Trigger>
    </Style.Triggers>
</Style>

The above style does not recreate the look of the button from the image, it's just a sample on how it can be done.

You can have a look at the Button class to see what properties you can change.


If I understood your question properly, I think you can change the opacity on MousePressed and Mouseover events.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜