|
|
@ -60,8 +60,8 @@ namespace ControlCatalog |
|
|
var decorations = this.Find<ComboBox>("Decorations"); |
|
|
var decorations = this.Find<ComboBox>("Decorations"); |
|
|
decorations.SelectionChanged += (sender, e) => |
|
|
decorations.SelectionChanged += (sender, e) => |
|
|
{ |
|
|
{ |
|
|
Window window = (Window)VisualRoot; |
|
|
if (VisualRoot is Window window) |
|
|
window.SystemDecorations = (SystemDecorations)decorations.SelectedIndex; |
|
|
window.SystemDecorations = (SystemDecorations)decorations.SelectedIndex; |
|
|
}; |
|
|
}; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -69,7 +69,8 @@ namespace ControlCatalog |
|
|
{ |
|
|
{ |
|
|
base.OnAttachedToVisualTree(e); |
|
|
base.OnAttachedToVisualTree(e); |
|
|
var decorations = this.Find<ComboBox>("Decorations"); |
|
|
var decorations = this.Find<ComboBox>("Decorations"); |
|
|
decorations.SelectedIndex = (int)((Window)VisualRoot).SystemDecorations; |
|
|
if (VisualRoot is Window window) |
|
|
|
|
|
decorations.SelectedIndex = (int)window.SystemDecorations; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|