internal void _ExecuteCloseCommand(LayoutDocument document)
        {
            if (DocumentClosing != null)
            {
                var evargs = new DocumentClosingEventArgs(document);
                DocumentClosing(this, evargs);
                if (evargs.Cancel)
                    return;
            }

            if( document.CloseDocument() )
            {
              if( DocumentClosed != null )
              {
                var evargs = new DocumentClosedEventArgs( document );
                DocumentClosed( this, evargs );
              }
            }
        }