2X faster development
The ultimate Xamarin UI toolkit to boost your development speed.
ReactiveUI is built on a reactive programming foundation and is specifically implemented utilizing Reactive Extensions. This article explains how to render dataform in ReactiveUI framework in Xamarin Forms. XAML DataForm definition in xaml. <Grid> <dataForm:SfDataForm x:Name="dataForm" Grid.Row="0"/> </Grid> C# The ContactInfo class (ViewModel) should be inherited from ReactiveObject. public class ContactInfo : ReactiveObject { private AddressInfo addressInfo; public AddressInfo AddressInfo { get => addressInfo; set => this.RaiseAndSetIfChanged(ref addressInfo, value); } public ContactInfo() { AddressInfo = new AddressInfo(); } } public class AddressInfo { public string Name { get; set; } public string Address{ get; set; } public string Email { get; set; } public string City { get; set; } } C# Derive the MainPage from IViewFor<T>, implement this interface on your Views to support Routing and Binding, and then set up the bindings for DataObject in the main page for the defined view model. public partial class MainPage : ContentPage, IViewFor<ContactInfo> { public MainPage() { InitializeComponent(); ViewModel = new ContactInfo(); this.Bind(ViewModel, x => x.AddressInfo, x => x.dataForm.DataObject); } public ContactInfo ViewModel { get; set; } object IViewFor.ViewModel { get { return ViewModel; } set { ViewModel = (ContactInfo)value; } } } Output |
2X faster development
The ultimate Xamarin UI toolkit to boost your development speed.
This page will automatically be redirected to the sign-in page in 10 seconds.