Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 91519

how to get custom Behavior property updates in my ViewModel?

$
0
0

I have a custom behavior "ConfirmPasswordBehavior" on my form like this:

<Entry x:Name="password" />
<Entry Text="{Binding Password}">
    <Entry.Behaviors>
       <ctrl:ConfirmPasswordBehavior IsValid="{Binding IsPasswordValid}" CompareToEntry="{Binding Source={x:Reference password}}" />
    </Entry.Behaviors>
</Entry>

I have its "IsValid" property bound to property in my view model. The view model never gets updated with the changes to behavior property. I've confirmed that the behavior is working correctly. I have debugger output like this:
Confirm password is False
Confirm password is True

I'm not sure what is wrong. I wanted to avoid having to reference the behavior control directly in my C# code. Is this possible to get the bindings to work the way I'd like?

Matt


Viewing all articles
Browse latest Browse all 91519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>