示例#1
0
		public MessageResult ShowConfirm( ViewModelBase model, string title=null, string msg=null ) {

			MessageBoxWindow win = new MessageBoxWindow();

			/// Should not be necessary since ShowDialog() will return a result if window is closed.
			//win.AddHandler( Controls.MessageBox.MessageClosedEvent, new MessageResultHandler( this.OnMessageClosed ) );

			bool? result = win.ShowConfirm( title, msg );
			if( result == null ) {
				return MessageResult.Cancel;
			} else if( result == true ) {
				return MessageResult.Accept;
			}
			return MessageResult.Reject;

		}