diff --git a/src/Artemis.UI.Shared/Routing/Routable/IRoutableHostScreen.cs b/src/Artemis.UI.Shared/Routing/Routable/IRoutableHostScreen.cs index b09afb676..b524f739a 100644 --- a/src/Artemis.UI.Shared/Routing/Routable/IRoutableHostScreen.cs +++ b/src/Artemis.UI.Shared/Routing/Routable/IRoutableHostScreen.cs @@ -9,5 +9,6 @@ internal interface IRoutableHostScreen : IRoutableScreen { bool RecycleScreen { get; } IRoutableScreen? InternalScreen { get; } + IRoutableScreen? InternalDefaultScreen { get; } void InternalChangeScreen(IRoutableScreen? screen); } \ No newline at end of file diff --git a/src/Artemis.UI.Shared/Routing/Routable/RoutableHostScreenOfTScreen.cs b/src/Artemis.UI.Shared/Routing/Routable/RoutableHostScreenOfTScreen.cs index c61c27820..ca5208f19 100644 --- a/src/Artemis.UI.Shared/Routing/Routable/RoutableHostScreenOfTScreen.cs +++ b/src/Artemis.UI.Shared/Routing/Routable/RoutableHostScreenOfTScreen.cs @@ -25,7 +25,13 @@ public bool RecycleScreen protected set => RaiseAndSetIfChanged(ref _recycleScreen, value); } + /// + /// Gets the screen to show when no other screen is active. + /// + public virtual TScreen? DefaultScreen { get; } + IRoutableScreen? IRoutableHostScreen.InternalScreen => Screen; + IRoutableScreen? IRoutableHostScreen.InternalDefaultScreen => DefaultScreen; void IRoutableHostScreen.InternalChangeScreen(IRoutableScreen? screen) { diff --git a/src/Artemis.UI.Shared/Routing/Routable/RoutableHostScreenOfTScreenTParam.cs b/src/Artemis.UI.Shared/Routing/Routable/RoutableHostScreenOfTScreenTParam.cs index 89773e8d4..1dfef6b76 100644 --- a/src/Artemis.UI.Shared/Routing/Routable/RoutableHostScreenOfTScreenTParam.cs +++ b/src/Artemis.UI.Shared/Routing/Routable/RoutableHostScreenOfTScreenTParam.cs @@ -27,7 +27,13 @@ public bool RecycleScreen protected set => RaiseAndSetIfChanged(ref _recycleScreen, value); } + /// + /// Gets the screen to show when no other screen is active. + /// + public virtual TScreen? DefaultScreen { get; } + IRoutableScreen? IRoutableHostScreen.InternalScreen => Screen; + IRoutableScreen? IRoutableHostScreen.InternalDefaultScreen => DefaultScreen; void IRoutableHostScreen.InternalChangeScreen(IRoutableScreen? screen) { diff --git a/src/Artemis.UI.Shared/Routing/Router/Navigation.cs b/src/Artemis.UI.Shared/Routing/Router/Navigation.cs index 0d0f6083c..1df871d34 100644 --- a/src/Artemis.UI.Shared/Routing/Router/Navigation.cs +++ b/src/Artemis.UI.Shared/Routing/Router/Navigation.cs @@ -109,12 +109,11 @@ private async Task NavigateResolution(RouteResolution resolution, NavigationArgu // Navigate the child too if (resolution.Child != null) await NavigateResolution(resolution.Child, args, childScreen); - // Make sure there is no child - else if (childScreen.InternalScreen != null) - childScreen.InternalChangeScreen(null); + // Without a resolution, navigate to the default screen (which may be null) + else if (childScreen.InternalScreen != childScreen.InternalDefaultScreen) + childScreen.InternalChangeScreen(childScreen.InternalDefaultScreen); } - Completed = true; } diff --git a/src/Artemis.UI.Shared/Styles/Skeleton.axaml b/src/Artemis.UI.Shared/Styles/Skeleton.axaml index 2596c3fe6..0483a9763 100644 --- a/src/Artemis.UI.Shared/Styles/Skeleton.axaml +++ b/src/Artemis.UI.Shared/Styles/Skeleton.axaml @@ -8,6 +8,7 @@ + TitleTextBlockStyle This is heading 1 This is heading 2 This is heading 3 @@ -22,6 +23,7 @@ + @@ -39,6 +41,7 @@ + TitleTextBlockStyle This is heading 1 This is heading 2 This is heading 3 @@ -51,6 +54,7 @@ + @@ -68,6 +72,7 @@ + TitleTextBlockStyle This is heading 1 This is heading 2 This is heading 3 @@ -125,6 +130,11 @@ +