Class ClockViewModel

A base class for objects of which the properties must be observable.

Inheritance
ClockViewModel
Namespace: MOSAIC.ViewModels
Assembly: MOSAIC.dll
Syntax
public class ClockViewModel : ObservableObject, INotifyPropertyChanged, INotifyPropertyChanging

Constructors

ClockViewModel(ClockBlock)

Declaration
public ClockViewModel(ClockBlock clock)
Parameters
Type Name Description
ClockBlock clock

Fields

running

Declaration
[ObservableProperty]
private bool running
Field Value
Type Description
bool

startCommand

The backing field for StartCommand.

Declaration
private RelayCommand? startCommand
Field Value
Type Description
RelayCommand

stopCommand

The backing field for StopCommand.

Declaration
private RelayCommand? stopCommand
Field Value
Type Description
RelayCommand

toggleCommand

The backing field for ToggleCommand.

Declaration
private RelayCommand? toggleCommand
Field Value
Type Description
RelayCommand

Properties

Clock

Declaration
public ClockBlock Clock { get; }
Property Value
Type Description
ClockBlock

Running

Declaration
[ExcludeFromCodeCoverage]
public bool Running { get; set; }
Property Value
Type Description
bool

StartCommand

Gets an IRelayCommand instance wrapping Start().

Declaration
[ExcludeFromCodeCoverage]
public IRelayCommand StartCommand { get; }
Property Value
Type Description
IRelayCommand

StopCommand

Gets an IRelayCommand instance wrapping Stop().

Declaration
[ExcludeFromCodeCoverage]
public IRelayCommand StopCommand { get; }
Property Value
Type Description
IRelayCommand

ToggleCommand

Gets an IRelayCommand instance wrapping Toggle().

Declaration
[ExcludeFromCodeCoverage]
public IRelayCommand ToggleCommand { get; }
Property Value
Type Description
IRelayCommand

Methods

OnRunningChanged(bool)

Executes the logic for when Running just changed.

Declaration
private void OnRunningChanged(bool value)
Parameters
Type Name Description
bool value

The new property value that was set.

Remarks

This method is invoked right after the value of Running is changed.

OnRunningChanged(bool, bool)

Executes the logic for when Running just changed.

Declaration
private void OnRunningChanged(bool oldValue, bool newValue)
Parameters
Type Name Description
bool oldValue

The previous property value that was replaced.

bool newValue

The new property value that was set.

Remarks

This method is invoked right after the value of Running is changed.

OnRunningChanging(bool)

Executes the logic for when Running is changing.

Declaration
private void OnRunningChanging(bool value)
Parameters
Type Name Description
bool value

The new property value being set.

Remarks

This method is invoked right before the value of Running is changed.

OnRunningChanging(bool, bool)

Executes the logic for when Running is changing.

Declaration
private void OnRunningChanging(bool oldValue, bool newValue)
Parameters
Type Name Description
bool oldValue

The previous property value that is being replaced.

bool newValue

The new property value being set.

Remarks

This method is invoked right before the value of Running is changed.

Start()

Declaration
[RelayCommand]
private void Start()

Stop()

Declaration
[RelayCommand]
private void Stop()

Toggle()

Declaration
[RelayCommand]
private void Toggle()

Implements

INotifyPropertyChanged
INotifyPropertyChanging

Search documentation

Start typing to search the documentation.