Added AppWindow

This commit is contained in:
TheXamlGuy
2024-09-26 20:39:05 +01:00
parent 5c535daed8
commit b0e1eb4cb4
3 changed files with 20 additions and 19 deletions
@@ -184,4 +184,17 @@ public static class IHostBuilderExtension
return builder; return builder;
} }
public static IHostBuilder UseContentRoot(this IHostBuilder hostBuilder,
string contentRoot,
bool createDirectory)
{
if (createDirectory)
{
Directory.CreateDirectory(contentRoot);
}
hostBuilder.UseContentRoot(contentRoot);
return hostBuilder;
}
} }
@@ -1,19 +0,0 @@
using Microsoft.Extensions.Hosting;
namespace Toolkit.Foundation;
public static class IHostBuilderExtensions
{
public static IHostBuilder UseContentRoot(this IHostBuilder hostBuilder,
string contentRoot,
bool createDirectory)
{
if (createDirectory)
{
Directory.CreateDirectory(contentRoot);
}
hostBuilder.UseContentRoot(contentRoot);
return hostBuilder;
}
}
@@ -0,0 +1,7 @@
namespace Toolkit.UI.Controls.Avalonia;
public class AppWindow : FluentAvalonia.UI.Windowing.AppWindow
{
protected override Type StyleKeyOverride =>
typeof(FluentAvalonia.UI.Windowing.AppWindow);
}