示例#1
0
        private void CloseDrawerHandler(object sender, ExecutedRoutedEventArgs executedRoutedEventArgs)
        {
            if (executedRoutedEventArgs.Handled)
            {
                return;
            }

            if (executedRoutedEventArgs.Parameter is Dock dock)
            {
                var drawerClosingEventArgs = new DrawerClosingEventArgs(dock, DrawerClosingEvent);
                //multiple ways of calling back that the drawer is closing:
                // * routed event
                OnDrawerClosing(drawerClosingEventArgs);

                if (drawerClosingEventArgs.IsCancelled)
                {
                    return;
                }
            }

            SetOpenFlag(executedRoutedEventArgs, false);

            executedRoutedEventArgs.Handled = true;
        }
示例#2
0
 protected void OnDrawerClosing(DrawerClosingEventArgs eventArgs)
 {
     RaiseEvent(eventArgs);
 }