Zmień układ elementu Legenda wykresu Silverlight

Pracuję nad dostosowaniem układu wykresu narzędzi Silverlight. Mam dwa wymagania:

1) Przesuń obszar Legendy na dół wykresu (rozwiązany).

2) zmienić układ elementów w legendzie, aby były wyświetlane obok siebie, tj. {legenda 1}, {legenda 2}, {legenda 3}, a nie domyślny format kolumny.


1) było łatwe do rozwiązania za pomocą ControlTemplate (patrz poniżej).

2) Jak zmienić układ elementów legendy? Czy można to zrobić przez dalsze dostosowywanie szablonu ControlTemplate wykresu lub czy Legenda potrzebuje własnej szablonu ControlTemplate?

Sam wykres jest zdefiniowany jako:

<chartingToolkit:Chart Name="chartCompareMain" 
                       Template="{StaticResource ChartLayoutLegendBottom}">
        <chartingToolkit:Chart.Axes>
             <chartingToolkit:DateTimeAxis Orientation="X" 
                        AxisLabelStyle="{StaticResource ChartDateFormat}">
             </chartingToolkit:DateTimeAxis>
             <chartingToolkit:LinearAxis  Orientation="Y"/>
        </chartingToolkit:Chart.Axes>
</chartingToolkit:Chart>    

Szablon ControlTemplate do przenoszenia elementów legendy (na podstawie domyślnego szablonu) to:

<ControlTemplate x:Key="ChartLayoutLegendBottom" TargetType="chartingToolkit:Chart">
        <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="*" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <dataviz:Title Grid.Row="0" Content="{TemplateBinding Title}" Style="{TemplateBinding TitleStyle}" />
                <Grid Grid.Row="1" Margin="0,15,0,15">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>
                    <chartingprimitives:EdgePanel x:Name="ChartArea" Style="{TemplateBinding ChartAreaStyle}" Grid.Column="0" >
                        <Grid Canvas.ZIndex="-1" Style="{TemplateBinding PlotAreaStyle}" />
                        <Border Canvas.ZIndex="10" BorderBrush="#FF919191" BorderThickness="1" />
                    </chartingprimitives:EdgePanel>
                </Grid>
                <dataviz:Legend x:Name="Legend" Header="{TemplateBinding LegendTitle}" Style="{TemplateBinding LegendStyle}" Grid.Row="2"/>
            </Grid>
        </Border>
    </ControlTemplate>

questionAnswers(2)

yourAnswerToTheQuestion