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

Expander's DecoratorTemplate dosen't work in 2011 Q2

1 Answer 153 Views
Expander
This is a migrated thread and some comments may be shown as answers.
vicky
Top achievements
Rank 1
vicky asked on 21 Nov 2011, 04:36 AM

Hi,i want to change Decorator to imgae ,i code:

    x:Class="ExpanderStyle.MainPage"
    Width="640" Height="480">
    <UserControl.Resources>
        <ControlTemplate x:Key="RadExpanderDecoratorControlTemplate" TargetType="telerik:RadExpanderDecorator">
            <Grid>
             <Rectangle Fill="#FFCCCCCC" HorizontalAlignment="Center" VerticalAlignment="Center" Width="8" Height="2" />
             <Rectangle Fill="#FFCCCCCC" HorizontalAlignment="Center" VerticalAlignment="Center" Width="2" Height="8" />
            </Grid>
            </ControlTemplate>
    </UserControl.Resources>
 
    <Grid x:Name="LayoutRoot" Background="White">
        <telerik:RadExpander Content="Content of MyExpander" HorizontalAlignment="Left" VerticalAlignment="Top" DecoratorTemplate="{StaticResource RadExpanderDecoratorControlTemplate}" Header="MyExpander"/>
    </Grid>
</UserControl>

but this code don't work  in 2011 Q2
i try to work in 2010 Q2 ,it is OK....

1 Answer, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 23 Nov 2011, 05:44 PM
Hi Vicky,

 Since Q1 2011, the RadExpander's Template was re-factored and its size was significantly simplified. Actually, there is no DecoratorTemplate anymore although the DecoratorTemplate property still exists.
I created a sample project where I edited the default template of the RadExpander from Q2 2011, commented the parts that define and control the Expander Button and used your XAML that creates the "+" -button ( the two crossed Rectangles. Hope you will find it useful.

Best wishes,
Petar Mladenov
the Telerik team

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

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