Skip to content

ReactiveUserControl class

Defined in

Namespace: Avalonia.ReactiveUI Assembly: ReactiveUI.Avalonia.Autofac.dll Full name: Avalonia.ReactiveUI.ReactiveUserControl<T> Modifiers: public

Summary

View source

A ReactiveUI UserControl that implements the IViewFor interface and will activate your ViewModel automatically if the view model implements IActivatableViewModel. When the DataContext property changes, this class will update the ViewModel property with the new DataContext value, and vice versa.

Applies to

netstandard2.0, netstandard2.0, netstandard2.0, netstandard2.0, netstandard2.0

Class hierarchy
classDiagram
class ReactiveUserControl~T~
class UserControl
UserControl <|-- ReactiveUserControl~T~
class IViewFor~TViewModel~ {
    <>
}
IViewFor~TViewModel~ <|.. ReactiveUserControl~T~
class IViewFor {
    <>
}
IViewFor <|.. ReactiveUserControl~T~
class IActivatableView {
    <>
}
IActivatableView <|.. ReactiveUserControl~T~

Inherits from: UserControl

Implements: IViewFor<TViewModel>, IViewFor, IActivatableView

Constructors

NameSummary
.ctorInitializes a new instance of the [ReactiveUserControl](# class.

Properties

NameSummary
ViewModelGets or sets the ViewModel.

Fields

NameSummary
static ViewModelPropertyThe view model property.

Methods

NameSummary
OnDataContextChangedCalled when the DataContext property changes.
Inherited members