From ff8466f0f5ad643389c8ee58de47887ef6d367ff Mon Sep 17 00:00:00 2001 From: bluepilledgreat <97983689+bluepilledgreat@users.noreply.github.com> Date: Fri, 24 Jan 2025 19:47:07 +0000 Subject: [PATCH] add WindowCornerPreference --- Bloxstrap/Resources/CustomBootstrapperSchema.json | 11 ++++++++++- .../UI/Elements/Bootstrapper/CustomDialog.Elements.cs | 2 ++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Bloxstrap/Resources/CustomBootstrapperSchema.json b/Bloxstrap/Resources/CustomBootstrapperSchema.json index df53076..44b6631 100644 --- a/Bloxstrap/Resources/CustomBootstrapperSchema.json +++ b/Bloxstrap/Resources/CustomBootstrapperSchema.json @@ -45,7 +45,8 @@ "Version": "int", "Theme": "Theme", "Title": "string", - "IgnoreTitleBarInset": "bool" + "IgnoreTitleBarInset": "bool", + "WindowCornerPreference": "WindowCornerPreference" } }, "TitleBar": { @@ -507,6 +508,14 @@ "Horizontal", "Vertical" ] + }, + "WindowCornerPreference": { + "Values": [ + "Default", + "DoNotRound", + "Round", + "RoundSmall" + ] } } } \ No newline at end of file diff --git a/Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Elements.cs b/Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Elements.cs index e85f4f1..d5e8b19 100644 --- a/Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Elements.cs +++ b/Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Elements.cs @@ -387,6 +387,8 @@ namespace Bloxstrap.UI.Elements.Bootstrapper dialog.Resources.MergedDictionaries.Add(new ThemesDictionary() { Theme = wpfUiTheme }); dialog.DefaultBorderThemeOverwrite = wpfUiTheme; + dialog.WindowCornerPreference = ParseXmlAttribute(xmlElement, "WindowCornerPreference", Wpf.Ui.Appearance.WindowCornerPreference.Round); + // disable default window border if border is modified if (xmlElement.Attribute("BorderBrush") != null || xmlElement.Attribute("BorderThickness") != null) dialog.DefaultBorderEnabled = false;