Can i use Button's IsEnabled when Command is from a different Context?

Hello,

i have a ContentPage which is defining some Commands. This page is referenced from XAML using the "Source" Binding parameter:

<ContentPage ...
             x:Name="ThisPage">
...
Command="{Binding Source={x:Reference ThisPage}, Path=CancelCommand}"

That works without problems.
I am also binding some values to the object of type "Appointment", which is the context of the ListView i use:
CommandParameter="{Binding APP_ID}"
That part of the code also works without problems.

But now i'm trying to enable/disable some buttons, based on values from their base context (Appointment), while also binding their Command to a page property:

<Button
    Image="hand_thumb_up.png"
    Grid.Row="1"
    Grid.Column="0"
    Command="{Binding Source={x:Reference ThisPage}, Path=CommitCommand}"
    CommandParameter="{Binding APP_ID}"
    IsEnabled="{Binding HaveNotCommitted}"
    />

Everything in that example works - except for the IsEnabled binding.
I've read a lot about how that should work as long as IsEnabled comes after Command - however, that doesn't seem to apply here.
What's the problem? Is there a solution using my approach or do i have to do it in a completely different way?

Thanks in advance.

Sign In or Register to comment.