Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > Tools - VSB, Control Spy, Shape Editor > Customized theme for label does not work.

Customized theme for label does not work.

Feed from this thread
  • Loc Hoang avatar

    Posted on Sep 20, 2007 (permalink)

    Control version: RadControls for WinForms Q2 2007

    I created a theme for my labels to have the following property:
    <?xml version="1.0" encoding="utf-8"?>
    <XmlTheme xmlns:xsi="
    http://www.w3.org/2001/XMLSchema-instance" ThemeName="TestTheme">
      <BuilderRegistrations>
        <XmlStyleBuilderRegistration BuilderType="Telerik.WinControls.DefaultStyleBuilder">
          <StylesheetRelations>
            <RadStylesheetRelation ElementType="Telerik.WinControls.RootRadElement" RegistrationType="ElementTypeControlType" ElementName="" ControlName="" ControlType="Telerik.WinControls.UI.RadLabel" />
          </StylesheetRelations>
          <BuilderData xsi:type="XmlStyleSheet">
            <PropertySettingGroups>
              <XmlPropertySettingGroup>
                <PropertySettings>
                  <XmlPropertySetting Property="Telerik.WinControls.VisualElement.Font" Value="Arial, 9pt, style=Bold" />
                  <XmlPropertySetting Property="Telerik.WinControls.VisualElement.ForeColor" Value="ActiveCaption" />
                </PropertySettings>
                <Selectors>
                  <XmlTypeSelector ElementType="Telerik.WinControls.UI.RadLabel+RadLabelRootElement" />
                </Selectors>
              </XmlPropertySettingGroup>
              <XmlPropertySettingGroup>
                <PropertySettings />
                <Selectors>
                  <XmlTypeSelector ElementType="Telerik.WinControls.UI.RadLabelElement" />
                </Selectors>
              </XmlPropertySettingGroup>
            </PropertySettingGroups>
          </BuilderData>
        </XmlStyleBuilderRegistration>
      </BuilderRegistrations>
    </XmlTheme>

    When I selected my customized theme for the label, it defaulted back to the original setting. Please advise

    Reply

  • Mike Mike admin's avatar

    Posted on Sep 21, 2007 (permalink)

    Hello Loc Hoang,

    The problem seems to be related to the default values the VSB when saving the theme, which are different in the case of RadLabel. I'll make sure this gets changed accordingly in the next SP version of the products. Until then you can use the element UI editor in design time to customize the label's appearance OR you have to modify the xml theme file manually, after modifying using VSB app.

    The line:

    <RadStylesheetRelation ElementType="Telerik.WinControls.UI.RootRadElement" RegistrationType="ElementTypeControlType" ElementName="" ControlName="" ControlType="Telerik.WinControls.UI.RadLabel" />

    should become:

    <RadStylesheetRelation ElementType="Telerik.WinControls.UI.RadLabel+RadLabelRootElement" RegistrationType="ElementTypeControlType" ElementName="" ControlName="" ControlType="Telerik.WinControls.UI.RadLabel" />

    I've attached the modified version of the original XML.


    Best wishes,
    Mike
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center

    Reply

  • Loc Hoang avatar

    Posted on Sep 21, 2007 (permalink)

    Mike:
    Thanks for the quick reply. I've changed my xml file as instructed and my customed theme name disapeared from the theme selection for the Label. I have to mannually type the theme name and it works. Thanks again.

    Reply

  • Peeter Ilumäe avatar

    Posted on Nov 19, 2009 (permalink)

    Hi,

    I'm trying out your Windows Forms component set here and I've run into a similar issue here, that I think might in some way related to above.

    I have a RadForm where I've added various RadControls among others a  RadLabel.

    After adding a Breeze theme to the form and all the controls I noticed there was no way to apply the theme to RadLabel control - the name of the theme just won't show up on theme selection menu?

    Is there a workaround to this or am I doing something wrong?

    Edit: Forgot to mention  - I am using the latest version of the toolset.

    Reply

  • Peeter Ilumäe avatar

    Posted on Nov 19, 2009 (permalink)

    So it turned out the fix was simple - I didn't have to do anything to the label - on form area it works fine.

    In a Breeze themed radGroupBox however it's background color is gray while the boxes' background is white. And while the label didn't adapt to the new container automatically it is simple enough to change the labels background color to white manually. 

    Problem solved:)

    Reply

  • Nick Nick admin's avatar

    Posted on Nov 23, 2009 (permalink)

    Hi Peeter Ilumäe,

    I am glad to see that you found a solution.

    Greetings,
    Nick
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > Tools - VSB, Control Spy, Shape Editor > Customized theme for label does not work.
Related resources for "Customized theme for label does not work."

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