private async void tbSensorWidth_TextChanged(object sender, TextChangedEventArgs e) { if (tbSensorHeight.Text != "" && tbSensorWidth.Text != "") { double newWidth = double.Parse(tbSensorWidth.Text); double newHeight = double.Parse(tbSensorHeight.Text); if (newWidth < _maxWidth && newHeight < _maxHeight) { await Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () => { _parentPage.TemporaryUpdateSensorDisplay(_sensorTupleIndex, newWidth, newHeight); }); } } }