문제

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