Click or drag to resize

DialogViewModel Class

Implementation of IDialogViewModel. This abstract class implements the dialog data handling logic and is therefore preferred over a custom implementation of IDialogViewModel.
Inheritance Hierarchy
System.Object
  BionicCode.Utilities.Net.Standard.ViewModel.ViewModel
    BionicCode.Utilities.Net.Framework.Wpf.Dialog.DialogViewModel

Namespace:  BionicCode.Utilities.Net.Framework.Wpf.Dialog
Assembly:  BionicCode.Utilities.Net.Framework.Wpf (in BionicCode.Utilities.Net.Framework.Wpf.dll) Version: 1.0.3.0 (1.0.0.0)
Syntax

The DialogViewModel type exposes the following members.

Constructors
Properties
  NameDescription
Public propertyDialogResult
The DialogResult of the user interaction.
Public propertyHasErrors
Gets a value that indicates whether the entity has validation errors.
(Inherited from ViewModel.)
Public propertyMessage
The message for the dialog to show to the user.
Public propertyResponseCallbackAsync
The asynchronous callback that is invoked during the dialog interaction. Use this callback as continuation of the interrupted flow, after the required data was collected by the dialog.
Public propertySendResponseAsyncCommand
ICommand that can be bound to the buttons of the dialog. The command parameter is a DialogResult.
Public propertyTitle
The title of the dialog Window
Public propertyTitleBarIcon
The icon to display in the title bar of the Window
Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodExecuteSendResponseCommandAsync
Asynchronously called when the SendResponseAsyncCommand is executed.
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetErrors
Gets all error messages of the specified property. If the propertyName is null all error messages will be returned.
(Inherited from ViewModel.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetPropertyErrors
Gets all error messages of the specified property. If the propertyName is null all error messages will be returned.
(Inherited from ViewModel.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodIsValueValid<TValue>
Can be used to check whether a value is valid.
(Inherited from ViewModel.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodOnErrorsChanged
Raised when the validation state of the view model has changed (e.g. error added or removed).
(Inherited from ViewModel.)
Protected methodOnInteractionCompleted
Event invocator of the InteractionCompleted event. Raising this event will request the dialog to be closed.
Protected methodOnPropertyChanged
Method called to fire a PropertyChanged event. Also raises the PropertyChanged event to support binding.
(Inherited from ViewModel.)
Public methodPropertyHasError
Checks whether the specified property has errors or is valid.
(Inherited from ViewModel.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Protected methodTrySetValue<TValue>(TValue, TValue, String)
Generic property setter. Sets the value of any property of the extending view model by passing in a the corresponding property backing field. Automatically raises the PropertyChanged event for this property.
(Inherited from ViewModel.)
Protected methodTrySetValue<TValue>(TValue, Func<TValue, ValueTuple<Boolean, IEnumerable<String>>>, TValue, Boolean, Boolean, String)
Sets the value of the referenced property and executes a validation delegate.
(Inherited from ViewModel.)
Protected methodTrySetValueSilent<TValue>(TValue, TValue, String)
Generic property setter. Silently sets the value of any property of the extending view model by passing in a the corresponding property backing field. Suppresses a PropertyChanged event for this property.
(Inherited from ViewModel.)
Protected methodTrySetValueSilent<TValue>(TValue, Func<TValue, ValueTuple<Boolean, IEnumerable<String>>>, TValue, Boolean, Boolean, String)
Silently sets the value of the referenced property without raising PropertyChanged and executes a validation delegate.
(Inherited from ViewModel.)
Top
Events
  NameDescription
Public eventErrorsChanged
Occurs when the validation errors have changed for a property or for the entire entity.
(Inherited from ViewModel.)
Public eventInteractionCompleted
Event to signal that the interaction with the dialog is completed.
Public eventPropertyChanged
Event fired whenever a child property changes its value.
(Inherited from ViewModel.)
Public eventPropertyValueChanged
PropertyChanged implementation that sends old value and new value of the change and raises the INotifyPropertyChanged event.
(Inherited from ViewModel.)
Top
Extension Methods
Remarks
It is recommended to use the Dialog attached behavior as it handles the view logic. Just bind DialogDataContextProperty to an instance of DialogViewModel (or IDialogViewModel) and define a DataTemplate for each implementation of DialogViewModel.
See Also
https://github.com/BionicCode/BionicCode.Net/blob/master/README.md