Table of Contents

Class ViewModelKeyAttribute

Namespace
Blazing.Mvvm.Components
Assembly
Blazing.Mvvm.dll

Specifies a key for a ViewModel on a View component, enabling keyed navigation and route mapping in Blazor MVVM applications. This attribute should only be used on View components.

[AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
public sealed class ViewModelKeyAttribute : Attribute

Inheritance

Inherited Members

Constructors

ViewModelKeyAttribute(object)

Initializes a new instance of the ViewModelKeyAttribute class with the specified key.

public ViewModelKeyAttribute(object key)

Parameters

key object

The key to associate with the ViewModel for navigation and route mapping.

Exceptions

ArgumentNullException

Thrown when the key is null.

Properties

Key

Gets the key associated with the ViewModel for keyed navigation.

public object Key { get; }

Property Value

object