예제 #1
0
        protected virtual void OnIsPaneOpenChanged()
        {
            bool cancel = false;

            if (PaneClosing != null)
            {
                var args = new SplitViewPaneClosingEventArgs();
                foreach (Windows.Foundation.TypedEventHandler <SplitView, SplitViewPaneClosingEventArgs> tmp in PaneClosing.GetInvocationList())
                {
                    tmp(this, args);
                    if (args.Cancel)
                    {
                        cancel = true;
                        break;
                    }
                }
            }
            if (!cancel)
            {
                OnStateChanged();

                if (PaneClosed != null)
                {
                    PaneClosed(this, new object());
                }
            }
            else
            {
                IsPaneOpen = false;
            }
        }
예제 #2
0
        protected virtual void OnIsPaneOpenChanged()
        {
            bool cancel = false;
            if (PaneClosing != null)
            {
                var args = new SplitViewPaneClosingEventArgs();
                foreach (Windows.Foundation.TypedEventHandler<SplitView, SplitViewPaneClosingEventArgs> tmp in PaneClosing.GetInvocationList())
                {
                    tmp(this, args);
                    if (args.Cancel)
                    {
                        cancel = true;
                        break;
                    }
                }
            }
            if (!cancel)
            {
                OnStateChanged();

                if (PaneClosed != null)
                {
                    PaneClosed(this, new object());
                }
            }
            else
            {
                IsPaneOpen = false;
            }
        }