Class ViewModelForAttribute
Marks a ViewModel to be automatically registered with its corresponding view component. The source generator will create registration code for this pairing. See https://dominiksta.github.io/Dmnk.Toolkit/api/Dmnk.Blazor.Mvvm.SourceGen.html.
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)]
public class ViewModelForAttribute : Attribute
- Inheritance
-
ViewModelForAttribute
- Inherited Members
Constructors
ViewModelForAttribute(Type)
Initializes a new instance of the ViewModelForAttribute class.
public ViewModelForAttribute(Type viewType)
Parameters
viewTypeTypeThe type of the Blazor component (view) for this ViewModel.
Properties
ViewType
Gets the type of the Blazor component (view) for this ViewModel.
public Type ViewType { get; }