The recording of the first ever ReactiveUI virtual conference is available on our YouTube Channel.

ViewContractAttribute Class

Summary

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.
Namespace
ReactiveUI
Base Types
  • object
  • Attribute
graph BT Type-->Base0["Attribute"] Base0-->Base1["object"] Type["ViewContractAttribute"] class Type type-node

Syntax

[AttributeUsage(AttributeTargets.Class)]
public sealed class ViewContractAttribute : Attribute

Attributes

Type Description
AttributeUsageAttribute

Constructors

Name Summary
ViewContractAttribute(string) Initializes a new instance of the ViewContractAttribute class. Constructs the ViewContractAttribute with a specific contract value.

Properties

Name Value Summary
Contract string
Gets the contract to use when resolving the view in the Splat Dependency Injection engine.

Extension Methods

Name Value Summary
BindCommand<ViewContractAttribute, TViewModel, TProp, TControl, TParam>(TViewModel?, Expression<Func<TViewModel, TProp?>>, Expression<Func<ViewContractAttribute, TControl>>, Expression<Func<TViewModel, TParam?>>, string?) IReactiveBinding<TView, TProp>
Bind a command from the ViewModel to an explicitly specified control on the View.
BindCommand<ViewContractAttribute, TViewModel, TProp, TControl, TParam>(TViewModel?, Expression<Func<TViewModel, TProp?>>, Expression<Func<ViewContractAttribute, TControl>>, IObservable<TParam?>, string?) IReactiveBinding<TView, TProp>
Bind a command from the ViewModel to an explicitly specified control on the View.
BindCommand<ViewContractAttribute, TViewModel, TProp, TControl>(TViewModel?, Expression<Func<TViewModel, TProp?>>, Expression<Func<ViewContractAttribute, TControl>>, string?) IReactiveBinding<TView, TProp>
Bind a command from the ViewModel to an explicitly specified control on the View.
BindValidation<ViewContractAttribute, TViewModel, TViewModelProperty, TViewProperty>(TViewModel?, Expression<Func<TViewModel, TViewModelProperty>>, Expression<Func<ViewContractAttribute, TViewProperty>>, IValidationTextFormatter<string>?) IDisposable
Binds the specified ViewModel property validation to the View property.
BindValidation<ViewContractAttribute, TViewModel, TViewModelProperty>(TViewModel?, Expression<Func<TViewModel, TViewModelProperty?>>, TextInputLayout, IValidationTextFormatter<string>?) IDisposable
Platform binding to the TextInputLayout.
BindValidation<ViewContractAttribute, TViewModel, TViewModelProperty>(TViewModel?, Expression<Func<TViewModel, TViewModelProperty?>>, TextInputLayout, IValidationTextFormatter<string>?) IDisposable
Platform binding to the TextInputLayout.
BindValidation<ViewContractAttribute, TViewModel, TViewProperty>(TViewModel?, Expression<Func<ViewContractAttribute, TViewProperty>>, IValidationTextFormatter<string>?) IDisposable
Binds the overall validation of a ViewModel to a specified View property.
BindValidation<ViewContractAttribute, TViewModel, TViewProperty>(TViewModel?, Expression<Func<TViewModel?, ValidationHelper?>>, Expression<Func<ViewContractAttribute, TViewProperty>>, IValidationTextFormatter<string>?) IDisposable
Binds a ValidationHelper from a ViewModel to a specified View property.
BindValidation<ViewContractAttribute, TViewModel>(TViewModel?, Expression<Func<TViewModel?, ValidationHelper?>>, TextInputLayout, IValidationTextFormatter<string>?) IDisposable
Platform binding to the TextInputLayout.
BindValidation<ViewContractAttribute, TViewModel>(TViewModel?, Expression<Func<TViewModel?, ValidationHelper?>>, TextInputLayout, IValidationTextFormatter<string>?) IDisposable
Platform binding to the TextInputLayout.
BindValidationEx<ViewContractAttribute, TViewModel, TViewModelProperty>(TViewModel?, Expression<Func<TViewModel, TViewModelProperty?>>, TextInputLayout, IValidationTextFormatter<string>?) IDisposable
Platform binding to the TextInputLayout.
BindValidationEx<ViewContractAttribute, TViewModel, TViewModelProperty>(TViewModel?, Expression<Func<TViewModel, TViewModelProperty?>>, TextInputLayout, IValidationTextFormatter<string>?) IDisposable
Platform binding to the TextInputLayout.
InvokeViewModelAction<T>(Action<T>) object
This is a thing I lifted from Prism.
WhenAnyObservable<ViewContractAttribute, TRet, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(Expression<Func<ViewContractAttribute, IObservable<T1>?>>, Expression<Func<ViewContractAttribute, IObservable<T2>?>>, Expression<Func<ViewContractAttribute, IObservable<T3>?>>, Expression<Func<ViewContractAttribute, IObservable<T4>?>>, Expression<Func<ViewContractAttribute, IObservable<T5>?>>, Expression<Func<ViewContractAttribute, IObservable<T6>?>>, Expression<Func<ViewContractAttribute, IObservable<T7>?>>, Expression<Func<ViewContractAttribute, IObservable<T8>?>>, Expression<Func<ViewContractAttribute, IObservable<T9>?>>, Expression<Func<ViewContractAttribute, IObservable<T10>?>>, Expression<Func<ViewContractAttribute, IObservable<T11>?>>, Expression<Func<ViewContractAttribute, IObservable<T12>?>>, Func<T1?, T2?, T3?, T4?, T5?, T6?, T7?, T8?, T9?, T10?, T11?, T12?, TRet>) IObservable<TRet>
Monitor a property that is an observable, and subscribe to the most recent emitted value.
WhenAnyObservable<ViewContractAttribute, TRet, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>(Expression<Func<ViewContractAttribute, IObservable<T1>?>>, Expression<Func<ViewContractAttribute, IObservable<T2>?>>, Expression<Func<ViewContractAttribute, IObservable<T3>?>>, Expression<Func<ViewContractAttribute, IObservable<T4>?>>, Expression<Func<ViewContractAttribute, IObservable<T5>?>>, Expression<Func<ViewContractAttribute, IObservable<T6>?>>, Expression<Func<ViewContractAttribute, IObservable<T7>?>>, Expression<Func<ViewContractAttribute, IObservable<T8>?>>, Expression<Func<ViewContractAttribute, IObservable<T9>?>>, Expression<Func<ViewContractAttribute, IObservable<T10>?>>, Expression<Func<ViewContractAttribute, IObservable<T11>?>>, Func<T1?, T2?, T3?, T4?, T5?, T6?, T7?, T8?, T9?, T10?, T11?, TRet>) IObservable<TRet>
Monitor a property that is an observable, and subscribe to the most recent emitted value.
WhenAnyObservable<ViewContractAttribute, TRet, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(Expression<Func<ViewContractAttribute, IObservable<T1>?>>, Expression<Func<ViewContractAttribute, IObservable<T2>?>>, Expression<Func<ViewContractAttribute, IObservable<T3>?>>, Expression<Func<ViewContractAttribute, IObservable<T4>?>>, Expression<Func<ViewContractAttribute, IObservable<T5>?>>, Expression<Func<ViewContractAttribute, IObservable<T6>?>>, Expression<Func<ViewContractAttribute, IObservable<T7>?>>, Expression<Func<ViewContractAttribute, IObservable<T8>?>>, Expression<Func<ViewContractAttribute, IObservable<T9>?>>, Expression<Func<ViewContractAttribute, IObservable<T10>?>>, Func<T1?, T2?, T3?, T4?, T5?, T6?, T7?, T8?, T9?, T10?, TRet>) IObservable<TRet>
Monitor a property that is an observable, and subscribe to the most recent emitted value.
WhenAnyObservable<ViewContractAttribute, TRet, T1, T2, T3, T4, T5, T6, T7, T8, T9>(Expression<Func<ViewContractAttribute, IObservable<T1>?>>, Expression<Func<ViewContractAttribute, IObservable<T2>?>>, Expression<Func<ViewContractAttribute, IObservable<T3>?>>, Expression<Func<ViewContractAttribute, IObservable<T4>?>>, Expression<Func<ViewContractAttribute, IObservable<T5>?>>, Expression<Func<ViewContractAttribute, IObservable<T6>?>>, Expression<Func<ViewContractAttribute, IObservable<T7>?>>, Expression<Func<ViewContractAttribute, IObservable<T8>?>>, Expression<Func<ViewContractAttribute, IObservable<T9>?>>, Func<T1?, T2?, T3?, T4?, T5?, T6?, T7?, T8?, T9?, TRet>) IObservable<TRet>
Monitor a property that is an observable, and subscribe to the most recent emitted value.
WhenAnyObservable<ViewContractAttribute, TRet, T1, T2, T3, T4, T5, T6, T7, T8>(Expression<Func<ViewContractAttribute, IObservable<T1>?>>, Expression<Func<ViewContractAttribute, IObservable<T2>?>>, Expression<Func<ViewContractAttribute, IObservable<T3>?>>, Expression<Func<ViewContractAttribute, IObservable<T4>?>>, Expression<Func<ViewContractAttribute, IObservable<T5>?>>, Expression<Func<ViewContractAttribute, IObservable<T6>?>>, Expression<Func<ViewContractAttribute, IObservable<T7>?>>, Expression<Func<ViewContractAttribute, IObservable<T8>?>>, Func<T1?, T2?, T3?, T4?, T5?, T6?, T7?, T8?, TRet>) IObservable<TRet>
Monitor a property that is an observable, and subscribe to the most recent emitted value.
WhenAnyObservable<ViewContractAttribute, TRet, T1, T2, T3, T4, T5, T6, T7>(Expression<Func<ViewContractAttribute, IObservable<T1>?>>, Expression<Func<ViewContractAttribute, IObservable<T2>?>>, Expression<Func<ViewContractAttribute, IObservable<T3>?>>, Expression<Func<ViewContractAttribute, IObservable<T4>?>>, Expression<Func<ViewContractAttribute, IObservable<T5>?>>, Expression<Func<ViewContractAttribute, IObservable<T6>?>>, Expression<Func<ViewContractAttribute, IObservable<T7>?>>, Func<T1?, T2?, T3?, T4?, T5?, T6?, T7?, TRet>) IObservable<TRet>
Monitor a property that is an observable, and subscribe to the most recent emitted value.
WhenAnyObservable<ViewContractAttribute, TRet, T1, T2, T3, T4, T5, T6>(Expression<Func<ViewContractAttribute, IObservable<T1>?>>, Expression<Func<ViewContractAttribute, IObservable<T2>?>>, Expression<Func<ViewContractAttribute, IObservable<T3>?>>, Expression<Func<ViewContractAttribute, IObservable<T4>?>>, Expression<Func<ViewContractAttribute, IObservable<T5>?>>, Expression<Func<ViewContractAttribute, IObservable<T6>?>>, Func<T1?, T2?, T3?, T4?, T5?, T6?, TRet>) IObservable<TRet>
Monitor a property that is an observable, and subscribe to the most recent emitted value.
WhenAnyObservable<ViewContractAttribute, TRet, T1, T2, T3, T4, T5>(Expression<Func<ViewContractAttribute, IObservable<T1>?>>, Expression<Func<ViewContractAttribute, IObservable<T2>?>>, Expression<Func<ViewContractAttribute, IObservable<T3>?>>, Expression<Func<ViewContractAttribute, IObservable<T4>?>>, Expression<Func<ViewContractAttribute, IObservable<T5>?>>, Func<T1?, T2?, T3?, T4?, T5?, TRet>) IObservable<TRet>
Monitor a property that is an observable, and subscribe to the most recent emitted value.
WhenAnyObservable<ViewContractAttribute, TRet, T1, T2, T3, T4>(Expression<Func<ViewContractAttribute, IObservable<T1>?>>, Expression<Func<ViewContractAttribute, IObservable<T2>?>>, Expression<Func<ViewContractAttribute, IObservable<T3>?>>, Expression<Func<ViewContractAttribute, IObservable<T4>?>>, Func<T1?, T2?, T3?, T4?, TRet>) IObservable<TRet>
Monitor a property that is an observable, and subscribe to the most recent emitted value.
WhenAnyObservable<ViewContractAttribute, TRet, T1, T2, T3>(Expression<Func<ViewContractAttribute, IObservable<T1>?>>, Expression<Func<ViewContractAttribute, IObservable<T2>?>>, Expression<Func<ViewContractAttribute, IObservable<T3>?>>, Func<T1?, T2?, T3?, TRet>) IObservable<TRet>
Monitor a property that is an observable, and subscribe to the most recent emitted value.
WhenAnyObservable<ViewContractAttribute, TRet, T1, T2>(Expression<Func<ViewContractAttribute, IObservable<T1>?>>, Expression<Func<ViewContractAttribute, IObservable<T2>?>>, Func<T1?, T2?, TRet>) IObservable<TRet>
Monitor a property that is an observable, and subscribe to the most recent emitted value.
WhenAnyObservable<ViewContractAttribute, TRet>(Expression<Func<ViewContractAttribute, IObservable<TRet>?>>) IObservable<TRet>
Observe a observable which is set to a property, and automatically subscribe to the most recent emitted value.
WhenAnyObservable<ViewContractAttribute, TRet>(Expression<Func<ViewContractAttribute, IObservable<TRet>?>>, Expression<Func<ViewContractAttribute, IObservable<TRet>?>>) IObservable<TRet>
Monitor a property that is an observable, and subscribe to the most recent emitted value.
WhenAnyObservable<ViewContractAttribute, TRet>(Expression<Func<ViewContractAttribute, IObservable<TRet>?>>, Expression<Func<ViewContractAttribute, IObservable<TRet>?>>, Expression<Func<ViewContractAttribute, IObservable<TRet>?>>) IObservable<TRet>
Monitor a property that is an observable, and subscribe to the most recent emitted value.
WhenAnyObservable<ViewContractAttribute, TRet>(Expression<Func<ViewContractAttribute, IObservable<TRet>?>>, Expression<Func<ViewContractAttribute, IObservable<TRet>?>>, Expression<Func<ViewContractAttribute, IObservable<TRet>?>>, Expression<Func<ViewContractAttribute, IObservable<TRet>?>>) IObservable<TRet>
Monitor a property that is an observable, and subscribe to the most recent emitted value.
WhenAnyObservable<ViewContractAttribute, TRet>(Expression<Func<ViewContractAttribute, IObservable<TRet>?>>, Expression<Func<ViewContractAttribute, IObservable<TRet>?>>, Expression<Func<ViewContractAttribute, IObservable<TRet>?>>, Expression<Func<ViewContractAttribute, IObservable<TRet>?>>, Expression<Func<ViewContractAttribute, IObservable<TRet>?>>) IObservable<TRet>
Monitor a property that is an observable, and subscribe to the most recent emitted value.
WhenAnyObservable<ViewContractAttribute, TRet>(Expression<Func<ViewContractAttribute, IObservable<TRet>?>>, Expression<Func<ViewContractAttribute, IObservable<TRet>?>>, Expression<Func<ViewContractAttribute, IObservable<TRet>?>>, Expression<Func<ViewContractAttribute, IObservable<TRet>?>>, Expression<Func<ViewContractAttribute, IObservable<TRet>?>>, Expression<Func<ViewContractAttribute, IObservable<TRet>?>>) IObservable<TRet>
Monitor a property that is an observable, and subscribe to the most recent emitted value.
WhenAnyObservable<ViewContractAttribute, TRet>(Expression<Func<ViewContractAttribute, IObservable<TRet>?>>, Expression<Func<ViewContractAttribute, IObservable<TRet>?>>, Expression<Func<ViewContractAttribute, IObservable<TRet>?>>, Expression<Func<ViewContractAttribute, IObservable<TRet>?>>, Expression<Func<ViewContractAttribute, IObservable<TRet>?>>, Expression<Func<ViewContractAttribute, IObservable<TRet>?>>, Expression<Func<ViewContractAttribute, IObservable<TRet>?>>) IObservable<TRet>
Monitor a property that is an observable, and subscribe to the most recent emitted value.
WhenAnyObservable<ViewContractAttribute, TRet>(Expression<Func<ViewContractAttribute, IObservable<TRet>?>>, Expression<Func<ViewContractAttribute, IObservable<TRet>?>>, Expression<Func<ViewContractAttribute, IObservable<TRet>?>>, Expression<Func<ViewContractAttribute, IObservable<TRet>?>>, Expression<Func<ViewContractAttribute, IObservable<TRet>?>>, Expression<Func<ViewContractAttribute, IObservable<TRet>?>>, Expression<Func<ViewContractAttribute, IObservable<TRet>?>>, Expression<Func<ViewContractAttribute, IObservable<TRet>?>>) IObservable<TRet>
Monitor a property that is an observable, and subscribe to the most recent emitted value.
WhenAnyObservable<ViewContractAttribute, TRet>(Expression<Func<ViewContractAttribute, IObservable<TRet>?>>, Expression<Func<ViewContractAttribute, IObservable<TRet>?>>, Expression<Func<ViewContractAttribute, IObservable<TRet>?>>, Expression<Func<ViewContractAttribute, IObservable<TRet>?>>, Expression<Func<ViewContractAttribute, IObservable<TRet>?>>, Expression<Func<ViewContractAttribute, IObservable<TRet>?>>, Expression<Func<ViewContractAttribute, IObservable<TRet>?>>, Expression<Func<ViewContractAttribute, IObservable<TRet>?>>, Expression<Func<ViewContractAttribute, IObservable<TRet>?>>) IObservable<TRet>
Monitor a property that is an observable, and subscribe to the most recent emitted value.
WhenAnyObservable<ViewContractAttribute, TRet>(Expression<Func<ViewContractAttribute, IObservable<TRet>?>>, Expression<Func<ViewContractAttribute, IObservable<TRet>?>>, Expression<Func<ViewContractAttribute, IObservable<TRet>?>>, Expression<Func<ViewContractAttribute, IObservable<TRet>?>>, Expression<Func<ViewContractAttribute, IObservable<TRet>?>>, Expression<Func<ViewContractAttribute, IObservable<TRet>?>>, Expression<Func<ViewContractAttribute, IObservable<TRet>?>>, Expression<Func<ViewContractAttribute, IObservable<TRet>?>>, Expression<Func<ViewContractAttribute, IObservable<TRet>?>>, Expression<Func<ViewContractAttribute, IObservable<TRet>?>>) IObservable<TRet>
Monitor a property that is an observable, and subscribe to the most recent emitted value.
WhenAnyObservable<ViewContractAttribute, TRet>(Expression<Func<ViewContractAttribute, IObservable<TRet>?>>, Expression<Func<ViewContractAttribute, IObservable<TRet>?>>, Expression<Func<ViewContractAttribute, IObservable<TRet>?>>, Expression<Func<ViewContractAttribute, IObservable<TRet>?>>, Expression<Func<ViewContractAttribute, IObservable<TRet>?>>, Expression<Func<ViewContractAttribute, IObservable<TRet>?>>, Expression<Func<ViewContractAttribute, IObservable<TRet>?>>, Expression<Func<ViewContractAttribute, IObservable<TRet>?>>, Expression<Func<ViewContractAttribute, IObservable<TRet>?>>, Expression<Func<ViewContractAttribute, IObservable<TRet>?>>, Expression<Func<ViewContractAttribute, IObservable<TRet>?>>) IObservable<TRet>
Monitor a property that is an observable, and subscribe to the most recent emitted value.
WhenAnyObservable<ViewContractAttribute, TRet>(Expression<Func<ViewContractAttribute, IObservable<TRet>?>>, Expression<Func<ViewContractAttribute, IObservable<TRet>?>>, Expression<Func<ViewContractAttribute, IObservable<TRet>?>>, Expression<Func<ViewContractAttribute, IObservable<TRet>?>>, Expression<Func<ViewContractAttribute, IObservable<TRet>?>>, Expression<Func<ViewContractAttribute, IObservable<TRet>?>>, Expression<Func<ViewContractAttribute, IObservable<TRet>?>>, Expression<Func<ViewContractAttribute, IObservable<TRet>?>>, Expression<Func<ViewContractAttribute, IObservable<TRet>?>>, Expression<Func<ViewContractAttribute, IObservable<TRet>?>>, Expression<Func<ViewContractAttribute, IObservable<TRet>?>>, Expression<Func<ViewContractAttribute, IObservable<TRet>?>>) IObservable<TRet>
Monitor a property that is an observable, and subscribe to the most recent emitted value.
With<ViewContractAttribute, TKey, TField>(Dictionary<TKey, TField>, IDictionary<TKey, TField>) TBuilder
Adds the specified dictionary to the provided dictionary.