private void ShowFontDialog() { FontChooser fontChooser = new FontChooser(); fontChooser.Owner = this; fontChooser.SetPropertiesFromObject(textBox); fontChooser.PreviewSampleText = textBox.SelectedText; if (fontChooser.ShowDialog().Value) { fontChooser.ApplyPropertiesToObject(textBox); } }