Let's agree to the disagree. We'll map 3rd party controls to our own classes therefore having the ability to declare XML to CRL mapping. Cleaner xaml without the prefixes.
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
using TheXamlGuy.UI.Avalonia.Controls;
|
||||
|
||||
namespace TheXamlGuy.Framework.Avalonia;
|
||||
|
||||
public class ContentDialogRouteHandler : RouteHandler<ContentDialog>
|
||||
{
|
||||
public override async void Handle(Route<ContentDialog> request)
|
||||
{
|
||||
if (request.Template is ContentDialog contentDialog)
|
||||
{
|
||||
contentDialog.DataContext = request.Data;
|
||||
await contentDialog.ShowAsync();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user