I'm attempting to implement functionality for our customers to allow them to change the font for ExplorerBarItems within a group. I need to be able to get the default FontData that is used when an item is added to a group. I'm not having too much luck.
Is there a way to get the font values from the group? I need to get the current font (even if it's the default) so I can pass it to the FontDialog object.
Thanks,
Jim
Any ideas?
Hello Jim,
If you have to get the default Font name from the Items in your Groups you could use the Michael Saltzman's suggestion :
AppearanceData appearanceData = new AppearanceData(); AppearancePropFlags appearancePropFlags = AppearancePropFlags.FontData; this.ultraExplorerBar1.Groups[0].Items[0].ResolveAppearance(ref appearanceData, ref appearancePropFlags);
Font baseFont = this.ultraExplorerBar1.Font; Font createdFont = null; Font itemFont;
try { createdFont = appearanceData.CreateFont(baseFont); itemFont = createdFont != null ? createdFont : baseFont; Debug.WriteLine(itemFont.Name); } finally { if (createdFont != null) createdFont.Dispose(); }
Please do not hesitate to contact us if you have any other questions.