Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > Ribbonbar > Source code to get to UI Elements

Answered Source code to get to UI Elements

Feed from this thread
  • Jason avatar

    Posted on Oct 31, 2011 (permalink)

    Hi,

    I'm rather new to the controls (specifically the ribbon) and I'm trying to achieve the Office 2010 look. I used that theme which turns the main application button into a dark blue folder tab. I would like to print "File" in white on this button.

    I have found in the UI Elements for the control that I can set the RadApplicationMenuButtonElement.DisplayStyle to Text, change the Forecolor to white, and change the Text to "File". This appears to work in design, but when I run the application and apply the theme, it goes away.

    Furthermore I need to support multiple languages, so I would like to set "File" from a language file.
    Does anyone know how to get to the UI elements from source code?

    Thanks.
    Jason

    Reply

  • Answer Ivan Petrov Ivan Petrov admin's avatar

    Posted on Nov 3, 2011 (permalink)

    Hello Jason,

    Thank you for writing.

    You can access the RadRibbonBar's ApplicationButton and set the DisplayStyle and Text through the following code:

    RadApplicationMenuButtonElement appButton = this.radRibbonBar1.RibbonBarElement.ApplicationButtonElement;
    appButton.DisplayStyle = DisplayStyle.Text;
    appButton.Text = "File";

    I hope this will help you. If you have further questions, I would be glad to help.
    Regards,
    Ivan Petrov
    the Telerik team

    Q2’11 SP1 of RadControls for WinForms is available for download (see what's new); also available is the Q3'11 Roadmap for Telerik Windows Forms controls.

    Reply

  • Jason avatar

    Posted on Nov 17, 2011 (permalink)

    Thanks Ivan. That was exactly what I needed.

    Can I access all the other properties in the UI Elements of all the controls the same way? They appear to be in an XML format so I didn't know if I should be querying them using XPath or something else.

    Thanks.
    Jason

    Reply

  • Ivan Petrov Ivan Petrov admin's avatar

    Posted on Nov 21, 2011 (permalink)

    Hi Jason,

    Thank you for writing back.

    We strive to keep all the elements of the controls and all properties exposed in the public API. This helps us to greatly improve the flexibility of the controls and helps users customize the controls with ease. If you want to know how to get a certain element and can't find your way in the API, feel free to write to us and we will help you get that element.

    I hope this answers your question. Should you need assistance I would be glad to provide it.

    Best wishes,
    Ivan Petrov
    the Telerik team

    Q2’11 SP1 of RadControls for WinForms is available for download (see what's new); also available is the Q3'11 Roadmap for Telerik Windows Forms controls.

    Reply

  • Jason avatar

    Posted on Dec 27, 2011 (permalink)

    Thanks. That worked great.

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > Ribbonbar > Source code to get to UI Elements
Related resources for "Source code to get to UI Elements"

[ Features | Demos | Documentation | Knowledge Base | Telerik TV | Code Library | Step-by-step Tutorial | Blogs | Self-Paced Trainer ]