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:
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.
Thanks Mike. I guess I'll use the standard font dialog as you suggested.
Hi,
The Font property you are looking at here is not the selected font. That's the Font property on Control. In other words, it's like Form.Font - it's the font that the dialog is using to display it's own text.
The FormattedTextEditor font dialog doesn't return a Windows Font. It's intended for use with the FormattedTextEditor, and so it applies an xml tag to the FormattedTextEditor. It's only intended for use with the FormattedTextEditor's editor dialog. So it can't be used as a replace for the Dotnet Framework's Font dialog.