Вопрос

I have created a UserControl which has a button inside and also a style for the button. The style sets the button background upon a mouse over trigger. Now i've added an dependency property of type ICommand and sets the button command to this new property. The command binding works properly however when custom control is disabled (canexecute = false) the mouse over trigger still changes the background.

I've tried changing the mouse over trigger like this but it doesn't work:

<MultiTrigger.Conditions>
    <Condition Property="IsMouseOver" Value="True"/>
    <Condition Property="IsEnabled" Value="True"/>
</MultiTrigger.Conditions>
<Setter Property="Background" Value="Orange"/>
</MultiTrigger>

Can anyone help?

Нет правильного решения

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top