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

EntryCell doesn't update model property until focus is lost on Windows Phone 8

$
0
0

I am using Xamarin.Forms with my view created in XAML. I am also using Xamarin.Forms.Labs.

I have bound an EntryCell to a property like so:

View:

    <EntryCell Label="Name:" Text="{Binding Name, Mode=TwoWay}" />

ViewModel:

    string _name;
        public String Name
        {
            get { return _name; }
            set { SetProperty(ref _name, value); }
        }

The page has a 'Save' ToolBarItem which saves the property to a database.

The issue I have is that the Name property is only updated when the entry cell loses focus after the user changes the text. Clicking the ToolBarItem does not change focus and therefore the property is not updated before being saved.

I would like the property to be updated with every key press from the user. I know of 'UpdateSourceTrigger' for Silverlight, but I can't find an equivalent way to do this in Xamarin Forms?

Thanks


Viewing all articles
Browse latest Browse all 58056

Trending Articles



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