[UWP] SplitView.PaneClosed event is available but not for PaneOpened RRS feed

  • Question

  • According to the https://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.controls.splitview.paneclosed.aspx there is no PaneOpened event for the SplitView control, only PaneClosed event for the SplitView control that exists.

    I have a Button control inside a SplitView pane that needs to change in size according whether the pane is opened or closed. So my plan is I will place a piece of code that will change the button size wider in the PaneOpened event, and restore it back to the small size in PaneClosed event. But it seems there is no PaneOpened event.

    Any other way that I can achieve this?
    Sunday, July 26, 2015 11:26 AM


  • Hello Sangadji,

    how does your SplitView open? Do you use any button or something like that?
    You can implement your logic for Pane Opened or Closed there.

    Another way to achieve it is to register on property changed event of IsPaneOpenProperty of your SplitView.


            private long _splitViewToken;
            protected override void OnNavigatedTo(NavigationEventArgs e)
                _splitViewToken = splitView.RegisterPropertyChangedCallback(SplitView.IsPaneOpenProperty, Callback);
            protected override void OnNavigatedFrom(NavigationEventArgs e)
            private void Callback(DependencyObject sender, DependencyProperty dp)
    //check if splitView is opened or closed. Debug.WriteLine("IsPaneOpen: "+ splitView.IsPaneOpen); }

    Hope that helps,


    Sunday, July 26, 2015 1:39 PM