Class ModalViewModelBase
データ検証とモーダルダイアログ表示機能を持つビューモデルの基底クラスです。
Inheritance
System.Object
    
    
    
    
    
    ModalViewModelBase
  Implements
System.ComponentModel.INotifyPropertyChanged
    System.IDisposable
    System.Windows.IWeakEventListener
    System.ComponentModel.IDataErrorInfo
    
  Inherited Members
      System.Object.ToString()
    
    
      System.Object.Equals(System.Object)
    
    
      System.Object.Equals(System.Object, System.Object)
    
    
      System.Object.ReferenceEquals(System.Object, System.Object)
    
    
      System.Object.GetHashCode()
    
    
      System.Object.GetType()
    
    
      System.Object.MemberwiseClone()
    
  Namespace: MakCraft.ViewModels
Assembly: MakViewModelsBase.dll
Syntax
public abstract class ModalViewModelBase : DialogViewModelBase, INotifyPropertyChanged, IDisposable, IWeakEventListener, IDataErrorInfo, IDialogTransferContainer
  Constructors
| Improve this Doc View SourceModalViewModelBase()
コンストラクタ。
Declaration
public ModalViewModelBase()
  Properties
| Improve this Doc View SourceOkCommand
OK ボタン用のコマンドです。 ボタンの有効・無効は OkCanExecute(Object)、コマンド処理の実体は OkExecute() を設定します。
Declaration
public ICommand OkCommand { get; }
  Property Value
| Type | Description | 
|---|---|
| System.Windows.Input.ICommand | 
Result
View 側の System.Windows.Window.DialogResult セットのトリガーとなるプロパティです。 View 側で Microsoft.Expression.Interactivity.Core.PropertyChangedTrigger の Binding と Microsoft.Expression.Interactivity.Core.ChangePropertyAction の Value にバインドしてください。
Declaration
public bool? Result { get; set; }
  Property Value
| Type | Description | 
|---|---|
| System.Nullable<System.Boolean> | 
Methods
| Improve this Doc View SourceOkCanExecute(Object)
OkCommand の 有効/無効 を返します。 データ検証エラーの有無を返します。データ検証エラーを用いないで判断したい場合はオーバーライドしてください。
Declaration
protected virtual bool OkCanExecute(object param)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Object | param | 
Returns
| Type | Description | 
|---|---|
| System.Boolean | 
OkExecute()
モーダルダイアログの OK ボタンクリック時の処理。 仮想メソッドは Window の DialogResult プロパティに true をセットする動作のみです。制御が必要な場合はオーバーライドしてください。
Declaration
protected virtual void OkExecute()
  Implements
      System.ComponentModel.INotifyPropertyChanged
  
  
      System.IDisposable
  
  
      System.Windows.IWeakEventListener
  
  
      System.ComponentModel.IDataErrorInfo