public ModalWindowViewModel() { ShowTextCommand.Subscribe(_ => { NumberOutput.Value = NumberInput.Value; NumberInput.Value = null; FocusTextBoxCommand.Execute(); }); ClearTextCommand = NumberOutput .Select(number => !(number is null)) .ToReactiveCommand(); ClearTextCommand.Subscribe(_ => { NumberOutput.Value = null; NumberInput.Value = null; FocusTextBoxCommand.Execute(); }); }