This commit is contained in:
Dan Clark
2025-02-11 17:59:16 +00:00
parent 95dd84d323
commit 66d61a3917
7 changed files with 9 additions and 18 deletions
-4
View File
@@ -10,14 +10,10 @@ public class ContentControlHandler :
public void Handle(NavigateTemplateEventArgs args)
{
if (args.Region is not ContentControl contentControl)
{
return;
}
if (args.Template is not Control control)
{
return;
}
void HandleLoaded(object? sender, RoutedEventArgs args)
{
@@ -16,8 +16,8 @@ public static class IServiceCollectionExtensions
services.AddTransient<IContentTemplate, ContentTemplate>();
services.AddTransient<INavigationRegion, NavigationRegion>();
services.AddHandler<NavigateTemplateEventArgs, ContentControlHandler>(nameof(ContentControl));
services.AddHandler<NavigateTemplateEventArgs, ContentDialogHandler>(nameof(ContentDialog));
services.AddHandlerScoped<NavigateTemplateEventArgs, ContentControlHandler>(nameof(ContentControl));
services.AddHandlerScoped<NavigateTemplateEventArgs, ContentDialogHandler>(nameof(ContentDialog));
services.AddTransient((Func<IServiceProvider, IProxyServiceCollection<IComponentBuilder>>)(provider =>
new ProxyServiceCollection<IComponentBuilder>(services =>