Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > Expander > Styling Components

Not answered Styling Components

Feed from this thread
  • Serif avatar

    Posted on Jul 29, 2011 (permalink)

    Hi, 

    Some of the telerik silverlight  components which contains content feature such as radexpander works strange if I try to apply a new style.

    The scenario is that, I try to add a new button in a radexpander header template. In order to activate this button and new style I need to call InitializeComponent method in constructor. However, if I do this, I can listen button events that I added, and there is no compile time
    error. Then at run time my button seems null. I guess there are two instances of the button. 

    There may be a constructor problem, which type of the following should be used in this case;

    public partial class  MyComponent : SomeRadComponent
    {
          public MyComponent() : base()
          {
              //does not show new style
          }
    }
     
    OR
     
    public partial class  MyComponent : SomeRadComponent
    {
          public MyComponent() : base()
          {
                InitializeComponent();
                //cannot  read component at run time
          }
    }
     OR
    public partial class  MyComponent : SomeRadComponent
    {
          public MyComponent()
          {
                InitializeComponent();
                //cannot  read component at run time
          }
    }


    What should I do when I m trying to extend a telerik component without loosing my components ?

    Thanks,
    Serif

    Reply

  • Tina Stancheva Tina Stancheva admin's avatar

    Posted on Aug 3, 2011 (permalink)

    Hello Serif,

    Can you please elaborate on your issues? I am afraid that from the code snippets you provided I cannot understand your scenario correctly.

    In the meantime I created a sample project illustrating how to create a custom control deriving from the RadExpander control and how to define a custom style for it. I hope it will get you on the right track.

    All the best,
    Tina Stancheva
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > Expander > Styling Components
Related resources for "Styling Components"

Silverlight Expander Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  ]