Table of Contents

Class ViewModelForAttribute

Namespace
Dmnk.Blazor.Mvvm
Assembly
Dmnk.Blazor.Mvvm.dll

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

viewType Type

The 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; }

Property Value

Type