Silverlight RadExpander 2011 Q2 and HeaderControlTemplate (obsolete)

2 posts, 0 answers
  1. DenisCL
    DenisCL avatar
    72 posts
    Member since:
    Dec 2009

    Posted 27 Sep 2011 Link to this post


    This code was working with Silverlight RadExpander 2010 Q3 :

    PageHome.waml.cs :
    private void expStats_Expanded(object sender, RoutedEventArgs e)
        ((RadExpander)sender).HeaderControlTemplate = this.Resources["ExpanderHomeHeaderTemplateOff"] as ControlTemplate;

    PageHome.xaml :
            <ControlTemplate TargetType="telerik:RadExpanderHeader" x:Key="ExpanderHomeHeaderTemplateOn">
                <Image Source="Images/Home/collapse.png" Cursor="Hand" ToolTipService.ToolTip="Afficher les rubriques" HorizontalAlignment="Right" Margin="0,-4,14,0" Stretch="None">
                        <RotateTransform CenterX="12" CenterY="12" Angle="180"></RotateTransform>
            <ControlTemplate TargetType="telerik:RadExpanderHeader" x:Key="ExpanderHomeHeaderTemplateOff">

    but since radControls 2011 HeaderControlTemplate is obsolete :(

    How can i use my custom expander header control template defined in pageHome.xaml ?????

    I need to hide the expander arrow by code...

    Please help



  2. Petar Mladenov
    Petar Mladenov avatar
    2986 posts

    Posted 30 Sep 2011 Link to this post

    Hello Deniscl,

    Since Q1 2011, the Style / ControlTemplate of the RadExpander has been improved (now it is much smaller than the one from Q3 2010). Previously there used to be two templates that control the Header part of the Expander which was a bad design. Here you can find the new Template structure of the RadExpander. In order use your custom Template , now you have to edit the Template of the Expander and change dynamically the whole Style. Please let us know if you need further assistance on this.

    Petar Mladenov
    the Telerik team

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

Back to Top