Exemplo n.º 1
0
		private void ClosePane()
		{
			SplitViewPaneClosingEventArgs args = new SplitViewPaneClosingEventArgs();
			PaneClosing?.Invoke(this, args);
			if (args.Cancel)
			{
				if (DisplayMode == SplitViewDisplayMode.Overlay || DisplayMode == SplitViewDisplayMode.CompactOverlay)
				{
					IsPaneOpen = true;
				return;
			}
			}
			ChangeVisualState(true);
			PaneClosed?.Invoke(this, EventArgs.Empty);
		}
Exemplo n.º 2
0
        private void ClosePane()
        {
            SplitViewPaneClosingEventArgs args = new SplitViewPaneClosingEventArgs();

            PaneClosing?.Invoke(this, args);
            if (args.Cancel)
            {
                if (DisplayMode == SplitViewDisplayMode.Overlay || DisplayMode == SplitViewDisplayMode.CompactOverlay)
                {
                    IsPaneOpen = true;
                    return;
                }
            }
            ChangeVisualState(true);
            PaneClosed?.Invoke(this, EventArgs.Empty);
        }
Exemplo n.º 3
0
        protected virtual void OnIsPaneOpenChanged()
        {
            bool cancel = false;
            if (PaneClosing != null)
            {
                var args = new SplitViewPaneClosingEventArgs();
                foreach (EventHandler<SplitViewPaneClosingEventArgs> tmp in PaneClosing.GetInvocationList())
                {
                    tmp(this, args);
                    if (args.Cancel)
                    {
                        cancel = true;
                        break;
                    }
                }
            }
            if (!cancel)
            {
                ChangeVisualState();

                if (PaneClosed != null)
                {
                    PaneClosed(this, EventArgs.Empty);
                }
            }
            else
            {
                IsPaneOpen = false;
            }
        }
Exemplo n.º 4
0
		private void splitview_PaneClosing(object sender, SplitViewPaneClosingEventArgs e)
		{
			e.Cancel = cancelClose.IsChecked.Value;
        }