Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
4028
FontDialog not behaving how I expect
posted

I want to use the infragistics FontDialog (Infragistics.Win.SupportDialogs.FormattedTextEditor.FontDialog) to allow users to select a font. I am trying to do so using this code:

Code Snippet
  1. Infragistics.Win.SupportDialogs.FormattedTextEditor.FontDialog fontDialog = new Infragistics.Win.SupportDialogs.FormattedTextEditor.FontDialog();
  2. if (fontDialog.ShowDialog() != System.Windows.Forms.DialogResult.OK)
  3.     return;
  4. lblCompanyNameSample.Font = fontDialog.Font;

Unfortunately it does not return the font I selected. It keeps returning the default font (Tahoma).

The standard windows FontDialog works as I am imagining (the code above works for that), but I'd prefer to use the infragistics one - it is a little prettier.

Can this be used in this way? And if so, how?

Thanks.