private void DefaultButton_Click(object sender, RoutedEventArgs e) { if (!string.IsNullOrEmpty(_tweak.InputHelper)) { if (_tweak.InputHelper.Contains("picture")) { var photoChooser = new PhotoChooserTask(); photoChooser.Completed += (object _, PhotoResult result) => { if (result.ChosenPhoto != null) { ValueInput.Text = result.OriginalFileName; } }; photoChooser.Show(); } } else { string value = _tweak.DefaultValueToString; if (!string.IsNullOrEmpty(value)) { ValueInput.SetValue(TextBox.TextProperty, _tweak.DefaultValueToString); } } }
void ValueChanged(object sender, string hashedKeys) { if (string.IsNullOrEmpty(hashedKeys)) { ValueInput.SetValue(TextBox.TextProperty, _tweak.ValueToString); } }
private void ReadButton_Click(object sender, RoutedEventArgs e) { ValueInput.SetValue(TextBox.TextProperty, _tweak.ValueToString); }