ElementClass works in Designer, not in Run-time

2 posts, 0 answers
  1. Sean McConnell
    Sean McConnell avatar
    38 posts
    Member since:
    Aug 2007

    Posted 05 Mar 2008 Link to this post

    Hello,

    We customized the Stylesheet-CLASS property using the 'Edit UI Elements' for a RadPanel. For example:

    Default:

    Element=FillPrimitive
    Class: RadPanelFill

    We changed to:

    Element=FillPrimitive
    Class: AdminPanelFill

    In our theme file, we have a property setting group with ClassSelector:

    <XmlClassSelector ElementClass="AdminPanelFill">

    In the designer, this works as expected, but in run-mode it fails to work. The theme IS being loaded, I confirmed this by debugging and using immediate mode to return the default style builder from the ThemeResolutionService. But instead of using our custom Class names, it reverts to 'RadPanelFill'.

    Please advise on this issue, at this point it appears that using themes with custom class names for primitives does not work as expected. Possibly we are doing something wrong, however the 'manual' provides little to no help - we wish to continue using the control library for future projects, but at this time there appear to be too many bugs or inconsistencies with the help documentation.


  2. Nikolay
    Admin
    Nikolay avatar
    1804 posts

    Posted 06 Mar 2008 Link to this post

    Hi Randall Kohltfarber,

    I cannot confirm the behavior you have described.

    I tried your case by following the two steps below:
    1. In the theme xml file, I changed <XmlClassSelector ElementClass="RadPanelFill" /> to <XmlClassSelector ElementClass="RadPanelFillCustom" />
    2. Using 'Edit UI Elements', I changed the Class property of the RadPanel FillPrimitive to RadPanelFillCustom.

    At run-time, the Class value of the FillPrimitive is RadPanelFillCustom and the theme is applied successfully. I tried adding the theme using both 'Load Theme From File' and 'Load Theme from resources' approaches.

    If you follow the above steps, and continue to experience the kind of behavior, please open a new support ticket and send me a sample project accompanied by the theme to allow me investigate it further.

    As far as our documentation is concerned, we have made significant improvements, expanding it three times from Q2 2007 to Q3 2007. We also started  Weekly Documentation Builds to keep you informed on the documentation progress and to gather your feedback in return.

    Should you need additional assistance, do not hesitate to contact me.

    Greetings,

    Nikolay
    the Telerik team


    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top