fix: ShowPage null reference when RadioButton.checked fires during XAML load
This commit is contained in:
@@ -39,8 +39,11 @@ namespace BetterSeewo.Manager
|
|||||||
private void ShowPage(StackPanel page)
|
private void ShowPage(StackPanel page)
|
||||||
{
|
{
|
||||||
foreach (var p in new[] { PageInstall, PageInk, PageConvert, PageTouch, PageActivate })
|
foreach (var p in new[] { PageInstall, PageInk, PageConvert, PageTouch, PageActivate })
|
||||||
|
{
|
||||||
|
if (p != null)
|
||||||
p.Visibility = p == page ? Visibility.Visible : Visibility.Collapsed;
|
p.Visibility = p == page ? Visibility.Visible : Visibility.Collapsed;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void Minimize_Click(object s, RoutedEventArgs e) => WindowState = WindowState.Minimized;
|
private void Minimize_Click(object s, RoutedEventArgs e) => WindowState = WindowState.Minimized;
|
||||||
private void Maximize_Click(object s, RoutedEventArgs e) =>
|
private void Maximize_Click(object s, RoutedEventArgs e) =>
|
||||||
|
|||||||
Reference in New Issue
Block a user