/// <summary> /// Corrects the file extension according to the file type. /// </summary> private void FixFileExtenstion() { if (!string.IsNullOrWhiteSpace(txtFileName.Text)) { string ext = FileCreator.GetExtension(GetSelectedFileType()); txtFileName.Text = Path.ChangeExtension(txtFileName.Text, ext); } }