Hi Tom,
Thanks for contacting Syncfusion support.
Your requirement to have a common view model for all page to maintain the data to perform CRUD operation can be achieved by using the static view model to access it anywhere in your application without updating when navigation to another page.
Please refer the below sample and code snippet.
Code Snippet [C#]
[App.xaml.cs]
public App()
{
MainViewModel._ViewModel = new ViewModel();
………….
}
[MainViewModel.cs]
public static class MainViewModel
{
public static ViewModel _ViewModel { get; set; }
}
[MainPage.xaml]
<ContentPage.BindingContext>
<x:Binding Source="{x:Static local:MainViewModel._ViewModel}"/>
</ContentPage.BindingContext>
|
Please let us know, if you require further other assistance from us.
Regards,
Balasubramani Sundaram