This is a migrated thread and some comments may be shown as answers.

Silverlight RadExpander 2011 Q2 and HeaderControlTemplate (obsolete)

1 Answer 74 Views
Expander
This is a migrated thread and some comments may be shown as answers.
DenisCL
Top achievements
Rank 1
DenisCL asked on 27 Sep 2011, 08:40 AM

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


1 Answer, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 30 Sep 2011, 09:15 AM
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 >>

Tags
Expander
Asked by
DenisCL
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Share this question
or