public LoginViewModel(INavigationRoot root, string childName) : base(root, childName) { _api = new LazyScalar <IInstaApi>(() => new WrapApi( new SessionData(Login, Password), _http ).Value() ); }
/// <summary> /// Initializes the singleton application object. This is the first line of authored code /// executed, and as such is the logical equivalent of main() or WinMain(). /// </summary> public App() { this.InitializeComponent(); this.Suspending += OnSuspending; this.UnhandledException += (sender, e) => { //this is "our" MainViewModel INavigationRoot navigationRoot = Window.Current.Content .As <Frame>().Content .As <FrameworkElement>().DataContext .As <INavigationRoot>(); navigationRoot.NavigateTo( "main", new ErrorViewModelWithNavigationCommands(navigationRoot, e.Exception) ); }; }
/// <summary> /// Initializes the singleton application object. This is the first line of authored code /// executed, and as such is the logical equivalent of main() or WinMain(). /// </summary> public App() { this.InitializeComponent(); this.Suspending += OnSuspending; this.UnhandledException += (sender, e) => { e.Handled = true; _logger.Error($"app encountered an unhandled exception: {e.Exception.ToString()}"); //this is "our" MainViewModel INavigationRoot navigationRoot = Window.Current.Content .As <Frame>().Content .As <FrameworkElement>().DataContext .As <INavigationRoot>(); navigationRoot.NavigateTo( "main", new ErrorViewModelWithNavigationCommands(navigationRoot, e.Exception) ); }; _logger.Information("app started succesfully"); }
public BlankViewModel(INavigationRoot root, string childName = MainChild) : base(root, childName) { }
public PleaseWaitViewModel(INavigationRoot root, string child) : base(root, child) { }
public SecondPartViewModel(INavigationRoot root, string childName = "main") : base(root, childName) { }
/// <summary> /// Initializes a new instance of <see cref="ErrorViewModel"/>. /// </summary> /// <param name="root">The parent.</param> /// <param name="exception">An error.</param> /// <param name="childName">The name of the child.</param> public ErrorViewModel(INavigationRoot root, Exception exception, string childName = MainChild) : this(root, exception.ToString(), childName) { }
/// <summary> /// Initializes a new instance of <see cref="ErrorViewModel"/>. /// </summary> /// <param name="root">The parent.</param> /// <param name="error">An error.</param> /// <param name="childName">The name of the child.</param> public ErrorViewModel(INavigationRoot root, string error, string childName = MainChild) : this(root, childName) { Error = error; }
public PopupService(INavigationRoot navigationRoot, IBusyIndicator busyIndicator) { _navigationRoot = navigationRoot; _busyIndicator = busyIndicator; }
/// <summary> /// Initializes a new instance of <see cref="RedirectViewModel"/>. /// </summary> /// <param name="root">The <see cref="INavigationRoot"/>.</param> /// <param name="childName">The name of a child.</param> public RedirectViewModel(INavigationRoot root, string childName = MainChild) { _root = root.CheckNotNull("navigation root"); _child = childName.CheckNotNull(nameof(childName)); }
public BlankPageViewModel(INavigationRoot root, string childName = "main") : base(root, childName) { }
/// <summary> /// Initializes a new instance of <see cref="RedirectViewModelWithContent"/>. /// </summary> /// <param name="root">The navigation root.</param> /// <param name="childName">The name of the child.</param> public RedirectViewModelWithContent(INavigationRoot root, string childName) { _root = root; _child = childName; }
public OtherPageViewModel(INavigationRoot root, string childName) : base(root, childName) { }
/// <summary> /// Initializes a new instance of <see cref="ErrorViewModelWithNavigationCommands"/>. /// </summary> /// <param name="root">The parent.</param> /// <param name="error">An error.</param> public ErrorViewModelWithNavigationCommands(INavigationRoot root, Exception error) : this(new ErrorViewModel(root, error)) { }
public NavigationService(IPageFactory pageFactory, INavigationRoot navigationRoot) { _pageFactory = pageFactory; _navigationRoot = navigationRoot; }