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

Dock Legend proprity in 2009

1 Answer 50 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Rajkumar
Top achievements
Rank 1
Rajkumar asked on 31 Dec 2010, 07:18 AM
Is there any way to set the Legend below the chart(Dock properity in 2010) in 2009 release

1 Answer, 1 is accepted

Sort by
0
Sia
Telerik team
answered on 31 Dec 2010, 03:09 PM
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
Tags
Chart
Asked by
Rajkumar
Top achievements
Rank 1
Answers by
Sia
Telerik team
Share this question
or