Silverlight RadExpander 2011 Q2 and HeaderControlTemplate (obsolete)

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

    Posted 27 Sep 2011 Link to this post


    Hello,

    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 :
    ------------------------
    <local:BaseGridPage.Resources>
            <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">
                    <Image.RenderTransform>
                        <RotateTransform CenterX="12" CenterY="12" Angle="180"></RotateTransform>
                    </Image.RenderTransform>
                </Image>
            </ControlTemplate>
            <ControlTemplate TargetType="telerik:RadExpanderHeader" x:Key="ExpanderHomeHeaderTemplateOff">
            </ControlTemplate>
        </local:BaseGridPage.Resources>


    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

    Thanks

    Frederic


  2. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 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.

    Regards,
    Petar Mladenov
    the Telerik team

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

  3. DevCraft banner
Back to Top