Improve navigation

This commit is contained in:
TheXamlGuy
2024-05-16 22:30:01 +01:00
parent 7f3c4c53cc
commit 85a14a8259
9 changed files with 53 additions and 38 deletions
+6 -6
View File
@@ -9,16 +9,16 @@ public class NavigateBackAction :
AvaloniaObject,
IAction
{
public static readonly StyledProperty<string> ContextProperty =
AvaloniaProperty.Register<NavigateBackAction, string>(nameof(Context));
public static readonly StyledProperty<string> RegionProperty =
AvaloniaProperty.Register<NavigateBackAction, string>(nameof(Region));
public static readonly StyledProperty<string> ScopeProperty =
AvaloniaProperty.Register<NavigateBackAction, string>(nameof(Scope));
public string Context
public string Region
{
get => GetValue(ContextProperty);
set => SetValue(ContextProperty, value);
get => GetValue(RegionProperty);
set => SetValue(RegionProperty, value);
}
public string Scope
@@ -34,7 +34,7 @@ public class NavigateBackAction :
{
if (control.DataContext is IObservableViewModel observableViewModel)
{
observableViewModel.Publisher.Publish(new NavigateBackEventArgs(Context
observableViewModel.Publisher.Publish(new NavigateBackEventArgs(Region
?? null, Scope ?? null));
}
}