Each Behavior is a Behavior<T> class descendant. The T parameter defines the associated control type.
The Behavior<T> class contains the AssociatedObject property. DevExpress MVVM Framework specifies this property when you add a Behavior to the Behaviors collection.
After the AssociatedObject is specified, DevExpress MVVM Framework invokes the virtual OnAttached method. You can override this method to subscribe to AssociatedObject's events and initialize its properties.
To unsubscribe from events, you can use the virtual OnDetaching method. DevExpress MVVM Framework invokes when the Behavior is destroyed.
- ValidationBehavior.cs (VB: ValidationBehavior.vb)
- MainWindow.xaml (VB: MainWindow.xaml)
- MainWindow.xaml.cs (VB: MainWindow.xaml.vb)
- MainView.xaml (VB: MainView.xaml)
- MainView.xaml.cs (VB: MainView.xaml.vb)
- MainViewModel.cs (VB: MainViewModel.vb)
(you will be redirected to DevExpress.com to submit your response)