mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-21 10:01:27 -07:00
improve window border stuff
This commit is contained in:
parent
97ff46d3f3
commit
14ee7015e6
@ -636,8 +636,18 @@ namespace Bloxstrap.UI.Elements.Bootstrapper
|
|||||||
dialog.Effect = null;
|
dialog.Effect = null;
|
||||||
|
|
||||||
var theme = ParseXmlAttribute<Theme>(xmlElement, "Theme", Theme.Default);
|
var theme = ParseXmlAttribute<Theme>(xmlElement, "Theme", Theme.Default);
|
||||||
|
if (theme == Theme.Default)
|
||||||
|
theme = App.Settings.Prop.Theme;
|
||||||
|
|
||||||
|
var wpfUiTheme = theme.GetFinal() == Theme.Dark ? Wpf.Ui.Appearance.ThemeType.Dark : Wpf.Ui.Appearance.ThemeType.Light;
|
||||||
|
|
||||||
dialog.Resources.MergedDictionaries.Clear();
|
dialog.Resources.MergedDictionaries.Clear();
|
||||||
dialog.Resources.MergedDictionaries.Add(new ThemesDictionary() { Theme = theme.GetFinal() == Theme.Dark ? Wpf.Ui.Appearance.ThemeType.Dark : Wpf.Ui.Appearance.ThemeType.Light });
|
dialog.Resources.MergedDictionaries.Add(new ThemesDictionary() { Theme = wpfUiTheme });
|
||||||
|
dialog.DefaultBorderThemeOverwrite = wpfUiTheme;
|
||||||
|
|
||||||
|
// disable default window border if border is modified
|
||||||
|
if (xmlElement.Attribute("BorderBrush") != null || xmlElement.Attribute("BorderThickness") != null)
|
||||||
|
dialog.DefaultBorderEnabled = false;
|
||||||
|
|
||||||
// set the margin & padding on the element grid
|
// set the margin & padding on the element grid
|
||||||
dialog.ElementGrid.Margin = dialog.Margin;
|
dialog.ElementGrid.Margin = dialog.Margin;
|
||||||
|
2
wpfui
2
wpfui
@ -1 +1 @@
|
|||||||
Subproject commit c4c58c589970a66b27a9de41ab1b6b6539918b52
|
Subproject commit cdc5d6455ea313a19a048ae1d746b3825465f341
|
Loading…
Reference in New Issue
Block a user