Skip to content

Commit

Permalink
add WindowCornerPreference
Browse files Browse the repository at this point in the history
  • Loading branch information
bluepilledgreat committed Jan 24, 2025
1 parent 586dad0 commit ff8466f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Bloxstrap/Resources/CustomBootstrapperSchema.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
"Version": "int",
"Theme": "Theme",
"Title": "string",
"IgnoreTitleBarInset": "bool"
"IgnoreTitleBarInset": "bool",
"WindowCornerPreference": "WindowCornerPreference"
}
},
"TitleBar": {
Expand Down Expand Up @@ -507,6 +508,14 @@
"Horizontal",
"Vertical"
]
},
"WindowCornerPreference": {
"Values": [
"Default",
"DoNotRound",
"Round",
"RoundSmall"
]
}
}
}
2 changes: 2 additions & 0 deletions Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Elements.cs
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,8 @@ private static UIElement HandleXmlElement_BloxstrapCustomBootstrapper(CustomDial
dialog.Resources.MergedDictionaries.Add(new ThemesDictionary() { Theme = 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
if (xmlElement.Attribute("BorderBrush") != null || xmlElement.Attribute("BorderThickness") != null)
dialog.DefaultBorderEnabled = false;
Expand Down

0 comments on commit ff8466f

Please sign in to comment.