Init commit
This commit is contained in:
commit
0c711f7da6
26 changed files with 1733 additions and 0 deletions
29
GoldbergGUI.Core/Utils/CustomMvxAppStart.cs
Normal file
29
GoldbergGUI.Core/Utils/CustomMvxAppStart.cs
Normal file
|
@ -0,0 +1,29 @@
|
|||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using MvvmCross.Exceptions;
|
||||
using MvvmCross.Navigation;
|
||||
using MvvmCross.ViewModels;
|
||||
|
||||
namespace GoldbergGUI.Core.Utils
|
||||
{
|
||||
// ReSharper disable once ClassNeverInstantiated.Global
|
||||
public class CustomMvxAppStart<TViewModel> : MvxAppStart<TViewModel> where TViewModel : IMvxViewModel
|
||||
{
|
||||
public CustomMvxAppStart(IMvxApplication application, IMvxNavigationService navigationService) : base(application, navigationService)
|
||||
{
|
||||
}
|
||||
|
||||
protected override async Task NavigateToFirstViewModel(object hint = null)
|
||||
{
|
||||
//return base.NavigateToFirstViewModel(hint);
|
||||
try
|
||||
{
|
||||
await NavigationService.Navigate<TViewModel>().ConfigureAwait(false);
|
||||
}
|
||||
catch (System.Exception exception)
|
||||
{
|
||||
throw exception.MvxWrap("Problem navigating to ViewModel {0}", typeof(TViewModel).Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue