Search code examples
devexpress-windows-ui

Is it possible to set the button font for DevExpress ButtonEdit when it is in Glyph mode


I want to use codepoint #1F50D (magnifying glass) as the character displayed by the button of the DevExpress WinForm ButtonEdit control. Most fonts don't have a glyph at that codepoint, but some do. Can the button's font be set?


Solution

  • You can use EditorButton.Appearance property to modify the font of button.
    Here is example:

    var button = buttonEdit2.Properties.Buttons[0];
    
    button.Appearance.Font = new Font("Segoe UI Symbol", 8.25F);
    button.Appearance.Options.UseFont = true;
    

    Also you can modify the appearance in Visual Studio directly: Visual Studio

    Here is the result:
    Result