Table of Contents

Class PropertyInputViewModel<T>

Namespace
Artemis.UI.Shared.Services.PropertyInput
Assembly
Artemis.UI.Shared.dll

Represents the base class for a property input view model that is used to edit layer properties

public abstract class PropertyInputViewModel<T> : PropertyInputViewModel, IReactiveNotifyPropertyChanged<IReactiveObject>, IHandleObservableErrors, IReactiveObject, IEnableLogger, IValidatableViewModel, IDisposable, IActivatableViewModel

Type Parameters

T

The type of property this input view model supports

Inheritance
object
ReactiveObject
ReactiveValidationObject
PropertyInputViewModel<T>
Implements
IReactiveNotifyPropertyChanged<IReactiveObject>
IHandleObservableErrors
IReactiveObject
IEnableLogger
IValidatableViewModel
IActivatableViewModel
Inherited Members
ReactiveValidationObject.Dispose()
ReactiveValidationObject.HasErrors
ReactiveValidationObject.ValidationContext
ReactiveValidationObject.ErrorsChanged
ReactiveObject.SuppressChangeNotifications()
ReactiveObject.AreChangeNotificationsEnabled()
ReactiveObject.DelayChangeNotifications()
ReactiveObject.Changing
ReactiveObject.Changed
ReactiveObject.ThrownExceptions
ReactiveObject.PropertyChanging
ReactiveObject.PropertyChanged

Constructors

PropertyInputViewModel(LayerProperty<T>, IProfileEditorService, IPropertyInputService)

Creates a new instance of the PropertyInputViewModel<T> class

protected PropertyInputViewModel(LayerProperty<T> layerProperty, IProfileEditorService profileEditorService, IPropertyInputService propertyInputService)

Parameters

layerProperty LayerProperty<T>
profileEditorService IProfileEditorService
propertyInputService IPropertyInputService

Properties

Affix

Gets the affix to show after input elements

public string? Affix { get; }

Property Value

string

InputValue

Gets or sets the input value

[MaybeNull]
public T InputValue { get; set; }

Property Value

T

IsEnabled

Gets a boolean indicating whether the layer property should be enabled

public bool IsEnabled { get; }

Property Value

bool

IsPreviewing

Gets or boolean indicating whether the current input is being previewed, the value won't be applied until

Only applicable when using something like a DraggableNumberBox, see StartPreview() and ApplyPreview()

public bool IsPreviewing { get; }

Property Value

bool

LayerProperty

Gets the layer property this view model is editing

public LayerProperty<T> LayerProperty { get; }

Property Value

LayerProperty<T>

Prefix

Gets the prefix to show before input elements

public string? Prefix { get; }

Property Value

string

ProfileEditorService

Gets the profile editor service

public IProfileEditorService ProfileEditorService { get; }

Property Value

IProfileEditorService

PropertyInputService

Gets the property input service

public IPropertyInputService PropertyInputService { get; }

Property Value

IPropertyInputService

Time

Gets the current time at which the property is being edited

protected TimeSpan Time { get; }

Property Value

TimeSpan

Methods

ApplyInputValue()

Applies the input value to the layer property or the currently active preview.

protected virtual void ApplyInputValue()

ApplyPreview()

Applies the current preview to the property.

public virtual void ApplyPreview()

DiscardPreview()

Discard the preview of the property.

public virtual void DiscardPreview()

OnDataBindingsChanged()

Called when data bindings have been enabled or disabled on the layer property

protected virtual void OnDataBindingsChanged()

OnInputValueChanged()

Called when the input value has changed

protected virtual void OnInputValueChanged()

StartPreview()

Starts the preview of the current property, allowing updates without causing real changes to the property.

public virtual void StartPreview()