Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > Treeview > RadTreeView CustomControl loosing default Theme?

Not answered RadTreeView CustomControl loosing default Theme?

Feed from this thread
  • Wolfgang avatar

    Posted on Nov 18, 2011 (permalink)

    Hello!

    I've build a CustomControl derived from RadTreeView and overwritten the Click method from the RadTreeView.
    I want to use the default Telerik - Theme like in my other RadControls
    Properties:
             ThemeClassName: Telerik.WinControls.UI.*RadTreeView*,
             ThemeName: ControlDefault or mostly string empty

    When i use the CustomControl i loose all the default view settings of the RadTreeView.
    Selection and Mouse Over etc. displayed as white.
    Functionality works as expected.
    I tried to copy the Telerik.WinControls.UI.RadTreeView to the ThemeClassName property of the Control.
    But this doesn't work.
    How can i use the default behaviour view of the RadTreeView in my CustomControl?

    Thanks and kind regards

    Reply

  • Ivan Petrov Ivan Petrov admin's avatar

    Posted on Nov 21, 2011 (permalink)

    Hi Wolfgang,

    Thank you for writing.

    To make the theme work with your custom control you have to override the ThemeClassName property. In the case of the RadTreeView your code should look like the following code snippet:

    public override string ThemeClassName
    {
      get
      {
        return typeof(RadTreeView).FullName;
      }
    }

    This is the only thing you should do to make the theme work for your control.

    I hope this will help. Should you have further questions, I would be glad to assist you further.
    Kind 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

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > Treeview > RadTreeView CustomControl loosing default Theme?
Related resources for "RadTreeView CustomControl loosing default Theme?"

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