Button disabled but I can click on it

EnricoRossiniEnricoRossini USMember ✭✭✭

Hi guys,
look at this code

<Button IsEnabled="false" Text="Click me" Command="{Binding NextCommand}">
        <MultiTrigger TargetType="Button">
                <BindingCondition Binding="{Binding IsASelected}" Value="true" />
            <Setter Property="IsEnabled" Value="true" />

In my point of view the button is disable and I can't click on it, but you can :(
My simple question is: why?


  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭

    Are you certain your binding doesn't evaluate to true?
    Put a breakpoint on the get of the property to confirm your BindingContext is good and you are even trying to get the property.
    Since you only have one condition try using a regular trigger instead of multi

  • EnricoRossiniEnricoRossini USMember ✭✭✭

    Yes, I'm sure.

Sign In or Register to comment.