Class ViewContractAttribute
- Namespace
- ReactiveUI
- Assembly
- ReactiveUI.dll
Allows an additional string to make view resolution more specific than just a type. When applied to your IViewFor<T> -derived View, you can select between different Views for a single ViewModel instance.
[AttributeUsage(AttributeTargets.Class)]
public sealed class ViewContractAttribute : Attribute
- Inheritance
-
ViewContractAttribute
- Inherited Members
- Extension Methods
Remarks
Initializes a new instance of the ViewContractAttribute class. Constructs the ViewContractAttribute with a specific contract value.
Constructors
ViewContractAttribute(string)
Allows an additional string to make view resolution more specific than just a type. When applied to your IViewFor<T> -derived View, you can select between different Views for a single ViewModel instance.
public ViewContractAttribute(string contract)
Parameters
contract
stringThe value of the contract for view resolution.
Remarks
Initializes a new instance of the ViewContractAttribute class. Constructs the ViewContractAttribute with a specific contract value.
Properties
Contract
Gets the contract to use when resolving the view in the Splat Dependency Injection engine.
public string Contract { get; }