Browse Source
Merge pull request #3727 from MarcusWichelmann/fix-remote-demo-decorations-crash
Fix RemoteDemo crash
pull/3741/head
Nikita Tsukanov
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
4 additions and
3 deletions
-
samples/ControlCatalog/MainView.xaml.cs
|
|
|
@ -60,8 +60,8 @@ namespace ControlCatalog |
|
|
|
var decorations = this.Find<ComboBox>("Decorations"); |
|
|
|
decorations.SelectionChanged += (sender, e) => |
|
|
|
{ |
|
|
|
Window window = (Window)VisualRoot; |
|
|
|
window.SystemDecorations = (SystemDecorations)decorations.SelectedIndex; |
|
|
|
if (VisualRoot is Window window) |
|
|
|
window.SystemDecorations = (SystemDecorations)decorations.SelectedIndex; |
|
|
|
}; |
|
|
|
} |
|
|
|
|
|
|
|
@ -69,7 +69,8 @@ namespace ControlCatalog |
|
|
|
{ |
|
|
|
base.OnAttachedToVisualTree(e); |
|
|
|
var decorations = this.Find<ComboBox>("Decorations"); |
|
|
|
decorations.SelectedIndex = (int)((Window)VisualRoot).SystemDecorations; |
|
|
|
if (VisualRoot is Window window) |
|
|
|
decorations.SelectedIndex = (int)window.SystemDecorations; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|