/// <summary> /// If valid, add the user-provided Watermark and logo image details to local /// storage to be read by the background task /// </summary> /// <param name="sender">sender</param> /// <param name="e">Event arguments</param> private async void SetWatermarkButton_Click(object sender, RoutedEventArgs e) { if (IsValidWatermark(Watermark)) { // Save required values to local storage localStorage.SaveWatermarkTextToLocalStorage(Watermark); // If the check box for a logo image has been selected then add that too await AddLogoImageIfRequiredAsync(); // Let the OnXpsDataAvailable finish by signalling that all the required parameters are now available SignalThatAllRequiredInformationIsAvailable(); } else { // If bad number switch focus to the text box WatermarkTextBox.Focus(FocusState.Programmatic); // Highlight the text WatermarkTextBox.SelectAll(); } }
public static void GotFocused(WatermarkTextBox sender, RoutedEventArgs e) { sender.SelectAll(); }
public static void GotFocused(WatermarkTextBox sender, RoutedEventArgs e) { sender.SelectAll(); }