private void ButtonBrowseTextFile_Click(object sender, RoutedEventArgs e) { OpenFileDialog openFileDialog = new OpenFileDialog(); openFileDialog.Title = Title + " - Select clipboard text file..."; //openFileDialog.Filter = $"Clippy list file (*.{ext})|*.{ext}"; if (openFileDialog.ShowDialog() == true && !string.IsNullOrEmpty(openFileDialog.FileName)) { TextBoxClipboardTextFile.Text = openFileDialog.FileName; Encoding encoding = StaticHelper.GetFileEncoding(openFileDialog.FileName); ComboBoxEncoding.SelectedIndex = Array.FindIndex(Encoding.GetEncodings(), enc => enc.CodePage == encoding.CodePage); } }