iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
You can try to use following approach: Override OnResume in the activity of the root view model, then navigate to the target view model(for example: AboutViewModel).
I created a simple project by using Blank project template. By default, SimpleViewModel is set as the RootViewModel (see override OnStart in AppService.cs file of Core project). I added a layout in the Android project and named it as About.axml. I also add AboutActivity and AboutViewModel.
In SimpleActivity class, override OnResume and navigate to the AboutViewModel by using following snippet code.
protected override void OnResume() { base.OnResume(); this.ViewModel.NavigationService.Navigate(new NavigationTarget(typeof (AboutViewModel), NavigationMode.Modal)); }
Hope this help.
I put the code into my RootViewModel but I get:
protected override void OnResume() is marked as an override but no suitable method found to override.
And If I put this into AppServices.cs in the core, I get Core/Infrastructure/AppService.cs(18,18): Error CS0120: An object reference is required to access non-static member `Intersoft.Crosslight.ViewModels.ViewModelBase.NavigationService' (CS0120) (IncroudRadio.Core)
protected override void OnResume() { base.OnResume(); HomeViewModel.NavigationService.Navigate(new NavigationTarget(typeof (AdViewModel), NavigationMode.Modal)); }
I uploaded my simple project in here. Please have the project tested on your end and let me know whether it helps or not.
For your information, I'm using Crosslight 2 Update 5 assembly files in my local end.
Ok this kinda works for Android, it keeps popping up the AdViewModel over and over again which I can fix.
What about iOS?
public override void DidEnterBackground (UIApplication application) { }
I'm unable to put the code to the ViewModel in there within the AppDelegate.cs
You can try to override ViewDidAppear in MainViewController.cs and add following snippet code.
public override void ViewDidAppear(bool animated) { base.ViewDidAppear(animated); this.ViewModel.NavigationService.Navigate(new NavigationTarget(typeof(AboutViewModel), NavigationMode.Modal)); }
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname