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
TThe type of property this input view model supports
- Inheritance
-
objectReactiveObjectReactiveValidationObjectPropertyInputViewModel<T>
- Implements
-
IReactiveNotifyPropertyChanged<IReactiveObject>IHandleObservableErrorsIReactiveObjectIEnableLoggerIValidatableViewModelIActivatableViewModel
- Inherited Members
-
ReactiveValidationObject.Dispose()ReactiveValidationObject.HasErrorsReactiveValidationObject.ValidationContextReactiveValidationObject.ErrorsChangedReactiveObject.SuppressChangeNotifications()ReactiveObject.AreChangeNotificationsEnabled()ReactiveObject.DelayChangeNotifications()ReactiveObject.ChangingReactiveObject.ChangedReactiveObject.ThrownExceptionsReactiveObject.PropertyChangingReactiveObject.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
layerPropertyLayerProperty<T>profileEditorServiceIProfileEditorServicepropertyInputServiceIPropertyInputService
Properties
Affix
Gets the affix to show after input elements
public string? Affix { get; }
Property Value
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
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
LayerProperty
Gets the layer property this view model is editing
public LayerProperty<T> LayerProperty { get; }
Property Value
Prefix
Gets the prefix to show before input elements
public string? Prefix { get; }
Property Value
ProfileEditorService
Gets the profile editor service
public IProfileEditorService ProfileEditorService { get; }
Property Value
PropertyInputService
Gets the property input service
public IPropertyInputService PropertyInputService { get; }
Property Value
Time
Gets the current time at which the property is being edited
protected TimeSpan Time { get; }
Property Value
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()