private void UserControl_IsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e) { if (e.NewValue as bool? == true) { if (String.IsNullOrWhiteSpace(Properties.Settings.Default.PrefDownloadDir)) { TextBoxHelper.SetWatermark(tbDirectory, ReceiveFilesManager.GetDefaultDownloadDirectory(false)); } } }
private void TbDirectory_SourceUpdated(object sender, DataTransferEventArgs e) { if (sender is TextBox textBox) { if (String.IsNullOrWhiteSpace(Properties.Settings.Default.PrefDownloadDir)) { TextBoxHelper.SetWatermark(textBox, ReceiveFilesManager.GetDefaultDownloadDirectory(false)); } else { TextBoxHelper.SetWatermark(textBox, null); } } }