Class ViewParameterAttribute
- Namespace
- Blazing.Mvvm.ComponentModel
- Assembly
- Blazing.Mvvm.Base.dll
Specifies that a property in a ViewModel should be resolved from parameters passed to the associated View component.
Supports optional naming for parameter mapping.
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
public sealed class ViewParameterAttribute : AttributeInheritance
Inherited Members
Constructors
ViewParameterAttribute()
Initializes a new instance of the ViewParameterAttribute class. Marks the property to be resolved from a parameter with the same name as the property.
public ViewParameterAttribute()ViewParameterAttribute(string)
Initializes a new instance of the ViewParameterAttribute class with a specified parameter name.
public ViewParameterAttribute(string name)Parameters
namestring-
The name of the parameter to be resolved from.
Exceptions
- ArgumentException
-
Thrown when
nameis null, empty, or white-space.
Properties
Name
Gets the name of the View parameter to be resolved from. If null, the property name is used.
public string? Name { get; }