Dock Legend proprity in 2009

2 posts, 0 answers
  1. Rajkumar
    Rajkumar avatar
    5 posts
    Member since:
    Sep 2010

    Posted 31 Dec 2010 Link to this post

    Is there any way to set the Legend below the chart(Dock properity in 2010) in 2009 release
  2. Sia
    Admin
    Sia avatar
    766 posts

    Posted 31 Dec 2010 Link to this post

    Hello Rajkumar,

    You need to change the Template of RadChart and change the Grid.Row of the Chart Legend container. Here is the default template in the old versions of RadChart:

    <Style TargetType="telerikChart:RadChart">
        <Setter Property="Template" >
            <Setter.Value>
                <ControlTemplate TargetType="telerikChart:RadChart">
                    <Grid Background="{TemplateBinding Background}">
                        <Grid x:Name="PART_DefaultLayoutGrid">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                                <RowDefinition />
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <ContentPresenter
                    x:Name="PART_DefaultChartTitleContainer"
                    Grid.Row="0"
                    Grid.Column="0"/>
                            <ContentPresenter
                    x:Name="PART_DefaultChartAreaContainer"
                    Grid.Row="1"
                    Grid.Column="0" />
                            <Border Grid.Row="0"
                        Grid.Column="1"
                        Grid.RowSpan="2">
                                <ContentPresenter x:Name="PART_DefaultChartLegendContainer" />
                            </Border>
                        </Grid>
                        <ContentPresenter />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Background" >
            <Setter.Value>
                <ImageBrush ImageSource="{StaticResource ImageSource}" />
            </Setter.Value>
        </Setter>
    </Style>


    All the best,
    Sia
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for Silverlight
Back to Top