public void Show( object content, PopupControlCompletionDelegate onComplete ) { m_onComplete = onComplete; Content = content; Visibility = Visibility.Visible; Focus (); }
partial void Command_Close(CommandType commandType, object parameter, ref bool canExecute) { canExecute = true; if (commandType == CommandType.Execute) { Visibility = Visibility.Collapsed; Content = null; if (m_onComplete != null) { var onComplete = m_onComplete; m_onComplete = null; onComplete (this, parameter); } } }