Expander's DecoratorTemplate dosen't work in 2011 Q2

2 posts, 0 answers
  1. vicky
    vicky avatar
    1 posts
    Member since:
    May 2011

    Posted 20 Nov 2011 Link to this post

    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....

  2. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 23 Nov 2011 Link to this post

    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 >>

  3. DevCraft banner
Back to Top