Fix region bug

This commit is contained in:
Dan Clark
2025-02-12 20:59:38 +00:00
parent 92ea28d647
commit 5740e03ba1
24 changed files with 277 additions and 183 deletions
+4 -6
View File
@@ -22,13 +22,11 @@ public class NavigateAction :
public static readonly StyledProperty<string> RouteProperty =
AvaloniaProperty.Register<NavigateAction, string>(nameof(Route));
public static readonly StyledProperty<string> ScopeProperty =
AvaloniaProperty.Register<NavigateAction, string>(nameof(Scope));
public static readonly StyledProperty<NavigateScope?> ScopeProperty =
AvaloniaProperty.Register<NavigateAction, NavigateScope?>(nameof(Scope));
private ParameterCollection parameterCollection = [];
public event EventHandler? Navigated;
public object Region
{
get => GetValue(RegionProperty);
@@ -45,7 +43,7 @@ public class NavigateAction :
set => SetValue(RouteProperty, value);
}
public string Scope
public NavigateScope? Scope
{
get => GetValue(ScopeProperty);
set => SetValue(ScopeProperty, value);
@@ -65,7 +63,7 @@ public class NavigateAction :
ImmutableDictionary<string, object>.Empty;
observableViewModel.Messenger.Send(new NavigateEventArgs(Route, Region == this ? content : Region, Scope ?? null,
content.DataContext, Navigated, parameters));
content.DataContext, parameters));
}
}