Ticket T282396
Visible to All Users

Skin Office 2013 does not use Segoe UI font name in buttons, any way to change it?

created 10 years ago (modified 10 years ago)

Hello,

I'm using your guides of the link (https://documentation.devexpress.com/#WindowsForms/CustomDocument2533) to use the Skin "Office 2013" style in our main app.

The code I used in the Main.cs file is:

C#
// Use the Devexpress Skin Office 2013 for the whole application DevExpress.UserSkins.BonusSkins.Register(); DevExpress.LookAndFeel.UserLookAndFeel defaultUserLookAndFeel = DevExpress.LookAndFeel.UserLookAndFeel.Default; defaultUserLookAndFeel.SetSkinStyle("Office 2013");

The application style changes but I had seen that the Font style is not exactly what I expected for buttons, ribbonpages, and probably more ribbon items. I expected the font name "Segoe UI" and it seems to be "Tahoma".

As I don't know the actual Office 2013 font that has to be used, I preferred instead of request you the possibility of modifying the template of the "Office 2013" skin, to create a Custom Skin using your Skin Editor utility. I created a Skin using "Office 2013" skin as template to start with it, but I cannot find the place in which I can change the Font Name in the appearance for the ribbon items.

I generated the assembly for the Skin, included the library as reference on my project, and replaced the code above by the following code, and it is exactly the same result as the "Office 2013", good approach, but I need the font style change in the Skin Editor for example for the DevExpress.XtraBars.BarButtonItem and DevExpress.XtraBars.Ribbon.RibbonPage items I have in the Ribbon.

C#
DevExpress.LookAndFeel.UserLookAndFeel defaultUserLookAndFeel = DevExpress.LookAndFeel.UserLookAndFeel.Default; defaultUserLookAndFeel.SetSkinStyle("SkinProjectBasedOnOffice2013");

Thanks in advance!!!

Answers

created 10 years ago (modified 10 years ago)

In addtion, I found that if I include the following line after the setskinStyle, it works as expected:

C#
DevExpress.Utils.AppearanceObject.DefaultFont = new System.Drawing.Font("Segoe UI", DevExpress.Utils.AppearanceObject.DefaultFont.Size);

But I suposed that the font should be set in the Skin proejct through the Skin Editor utility.

Thanks in advance!!!

    Comments (3)
    Andrew Ser (DevExpress Support) 10 years ago

      Hello,
      Fonts are set at the application level, but not at the skin level. You found a correct approach to changing fonts for all our controls in the application. If you want to change the font only for ribbon items, use the BarAndDockingController component. Set the BarAndDockingController.AppearancesRibbon.Item.Font property.

        Thanks Andrew!!!
        I will do it as you recommend!!!
        Regards,
        David

        Andrew Ser (DevExpress Support) 10 years ago

          You're welcome, David! I'm happy to hear that my follow-up was helpful to you.

          Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

          Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.