add WindowCornerPreference

This commit is contained in:
bluepilledgreat 2025-01-24 19:47:07 +00:00
parent 586dad03f4
commit ff8466f0f5
2 changed files with 12 additions and 1 deletions

View File

@ -45,7 +45,8 @@
"Version": "int", "Version": "int",
"Theme": "Theme", "Theme": "Theme",
"Title": "string", "Title": "string",
"IgnoreTitleBarInset": "bool" "IgnoreTitleBarInset": "bool",
"WindowCornerPreference": "WindowCornerPreference"
} }
}, },
"TitleBar": { "TitleBar": {
@ -507,6 +508,14 @@
"Horizontal", "Horizontal",
"Vertical" "Vertical"
] ]
},
"WindowCornerPreference": {
"Values": [
"Default",
"DoNotRound",
"Round",
"RoundSmall"
]
} }
} }
} }

View File

@ -387,6 +387,8 @@ namespace Bloxstrap.UI.Elements.Bootstrapper
dialog.Resources.MergedDictionaries.Add(new ThemesDictionary() { Theme = wpfUiTheme }); dialog.Resources.MergedDictionaries.Add(new ThemesDictionary() { Theme = wpfUiTheme });
dialog.DefaultBorderThemeOverwrite = wpfUiTheme; dialog.DefaultBorderThemeOverwrite = wpfUiTheme;
dialog.WindowCornerPreference = ParseXmlAttribute<Wpf.Ui.Appearance.WindowCornerPreference>(xmlElement, "WindowCornerPreference", Wpf.Ui.Appearance.WindowCornerPreference.Round);
// disable default window border if border is modified // disable default window border if border is modified
if (xmlElement.Attribute("BorderBrush") != null || xmlElement.Attribute("BorderThickness") != null) if (xmlElement.Attribute("BorderBrush") != null || xmlElement.Attribute("BorderThickness") != null)
dialog.DefaultBorderEnabled = false; dialog.DefaultBorderEnabled = false;