Custom RadTreeNode

2 posts, 0 answers
  1. joseph
    joseph avatar
    1 posts
    Member since:
    Apr 2011

    Posted 06 Jun 2013 Link to this post

    I have custom TreeNodes that inherit from RadTreeNode.  When I try to select a node via code the custom treenode will not highlight.  I've tried all the examples I could find.  I saw the post about overriding the ThemeClassName for a treeview, but there is no such property for the radtreenode.  help please
  2. Anton
    Anton avatar
    167 posts

    Posted 12 Jun 2013 Link to this post

    Hello Joseph,

    Thank you for writing.

    When you are inheriting some of our controls and you want our theming mechanism to apply the theme for it you should set it ThemeClassName property. Consider the following example :
    this.ThemeClassName = typeof(SomeInheritedControl).FullName;

    However, in your case you are inheriting element not control, so you should not set ThemeClassName property but you should override the ThemeEffectiveType property in your custom element. This will point our theming mechanism how to style your custom element.

    Add the following code into your custom tree node:
    protected override Type ThemeEffectiveType
            return typeof(RadTreeNode);

    I hope this helps.

    RadChart for WinForms is obsolete. Now what?
  3. DevCraft R3 2016 release webinar banner
Back to Top