ObservableObjectAttribute Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
An attribute that indicates that a given type should have all the members from ObservableObject generated into it, as well as the INotifyPropertyChanged and INotifyPropertyChanging interfaces. This can be useful when you want the same functionality from ObservableObject into a class that already inherits from another one (since C# doesn't support multiple inheritance). This attribute will trigger the source generator to just create the same APIs directly into the decorated class.
This attribute can be used as follows:
[ObservableObject]
partial class MyViewModel : SomeOtherClass
{
// Other members here...
}
And with this, the same APIs from ObservableObject will be available on this type as well.
[System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=false, Inherited=false)]
public sealed class ObservableObjectAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=false, Inherited=false)>]
type ObservableObjectAttribute = class
inherit Attribute
Public NotInheritable Class ObservableObjectAttribute
Inherits Attribute
- Inheritance
-
ObservableObjectAttribute
- Attributes
Constructors
ObservableObjectAttribute() |