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:
@@ -14,14 +14,9 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\UI\Avalonia.Controls\Avalonia.Controls.csproj" />
|
||||
<ProjectReference Include="..\..\UI\Avalonia\Avalonia.csproj" />
|
||||
<ProjectReference Include="..\Core\Core.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="FluentAvalonia">
|
||||
<HintPath>References\FluentAvalonia.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
Binary file not shown.
@@ -1,22 +1,8 @@
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Controls.Primitives;
|
||||
using FluentAvalonia.UI.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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public class ContentControlRouteHandler : RouteHandler<ContentControl>
|
||||
{
|
||||
public override void Handle(Route<ContentControl> request)
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
using Avalonia.Controls.Primitives;
|
||||
using FluentAvalonia.UI.Controls;
|
||||
using FluentAvalonia.UI.Navigation;
|
||||
using TheXamlGuy.UI.Avalonia.Controls;
|
||||
|
||||
namespace TheXamlGuy.Framework.Avalonia;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Controls.Primitives;
|
||||
using FluentAvalonia.UI.Controls;
|
||||
using TheXamlGuy.Framework.Core;
|
||||
using TheXamlGuy.UI.Avalonia.Controls;
|
||||
|
||||
namespace TheXamlGuy.Framework.Avalonia;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user