AppTemplate.Controls.SplitViewPaneMenu.OnLoaded C# (CSharp) Method

OnLoaded() private method

private OnLoaded ( object sender, RoutedEventArgs e ) : void
sender object
e Windows.UI.Xaml.RoutedEventArgs
return void
        private void OnLoaded(object sender, RoutedEventArgs e)
        {
            var splitView = this.GetParentByType<SplitView>();
            if (splitView == null)
            {
                throw new InvalidOperationException(
                    "SplitViewPaneMenu cannot be applied to a control that is not of type SplitView");
            }

            this._parent = splitView;
            this._parent.RegisterPropertyChangedCallback(
                SplitView.IsPaneOpenProperty,
                (control, args) => { this.OnPaneToggled(); });

            this.OnPaneToggled(); ;
        }