Binding data to a view via code or XAML is easy; nothing special is needed to present data from an object to the view. Binding a POCO class will only give you that though. Updating the source object and expecting to reflect the change to the target view or trying to push the values changed by the user from the target to the source will not work out of the box.
Start by creating a Visual Studio Blank App (Xamarin.Forms Portable) solution. In the top menu, click File | New | Project… and give it the name
XamFormsBindingModes
.In the
XamFormsBindingModes
PCL library, right-click and choose Add | Class…; give it the namePerson.cs
and click Add.We will create an extension method extending the
PropertyChangedEventHandler
delegate handler type. Right-click the portable class library again and choose Add | Class…; name the classPropertyChangedEventHandlerExtensions.cs
and click Add.Make the class
static
and add the following three helper extension methods...