This commit is contained in:
TheXamlGuy
2024-05-24 08:21:50 +01:00
parent 40a150fe80
commit c0c1a82846
103 changed files with 168 additions and 655 deletions
+4 -3
View File
@@ -21,19 +21,20 @@ public class NavigateRegionAction :
[Content]
public ActionCollection Actions => actions ??= [];
public string Name
{
get => GetValue(NameProperty);
set => SetValue(NameProperty, value);
}
public object? Execute(object? sender,
public object? Execute(object? sender,
object? parameter)
{
if (sender is Control control)
{
if (control.DataContext is IObservableViewModel observableViewModel)
{
{
if (observableViewModel.Provider.GetRequiredService<INavigationRegion>() is INavigationRegion navigationRegion)
{
navigationRegion.Register(Name, sender);
@@ -44,4 +45,4 @@ public class NavigateRegionAction :
return true;
}
}
}