private void OnIsPaneOpenChanged(SplitView sender, AvaloniaPropertyChangedEventArgs e) { var newValue = (bool)e.NewValue; var oldValue = (bool)e.OldValue; if (sender == null || newValue == oldValue) { return; } if (newValue) { sender.ChangeVisualState(); // Open pane } else { sender.OnIsPaneOpenChanged(); // Close pane } }
private void OnMetricsChanged(SplitView sender, AvaloniaPropertyChangedEventArgs e) { sender?.TemplateSettings?.Update(); sender?.ChangeVisualState(true, true); }
private void OnStateChanged(SplitView sender, AvaloniaPropertyChangedEventArgs e) { sender?.ChangeVisualState(); }