Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6222855
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T08:23:19+00:00 2026-05-24T08:23:19+00:00

I’m using the Silverlight Control Toolkit and trying to position the legend below the

  • 0

I’m using the Silverlight Control Toolkit and trying to position the legend below the chart. Based on the question here, I’m trying to use a control template, but I’m clearly missing something and nothing is showing in place of the chart. Any help would be greatly appreciated:

<UserControl x:Class="ClientCenterControls.ReportView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"             
    xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit"
    xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"           
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:Controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data" 
    xmlns:project="clr-namespace:ClientCenterControls"
    xmlns:model="clr-namespace:ClientCenterControls.Model"
    mc:Ignorable="d"
    d:DesignHeight="400" d:DesignWidth="600">

    <UserControl.Resources>
        <ControlTemplate x:Key="ChartLayoutBottom" TargetType="toolkit:Chart">
            <Border>
                <StackPanel Orientation="Vertical">
                    <toolkit:Title Grid.Row="0" Content="{TemplateBinding Title}" />
                    <toolkit:Legend x:Name="Legend" Header="{TemplateBinding LegendTitle}" Grid.Row="2" />
                </StackPanel>
            </Border>
        </ControlTemplate>
    </UserControl.Resources>

    <Grid x:Name="LayoutRoot">
        <Grid.Background>
            <LinearGradientBrush EndPoint="0.5,1" MappingMode="RelativeToBoundingBox" StartPoint="0.5,0">
                <GradientStop Color="Silver" />
                <GradientStop Color="Gray" Offset="0.5"/>
                <GradientStop Color="White" Offset="1"/>
            </LinearGradientBrush>
        </Grid.Background>


        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="350" />
            <ColumnDefinition Width="250" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="25" />
            <RowDefinition />
        </Grid.RowDefinitions>


        <sdk:Label x:Name="headerLabel" Content="Client Center CSA" 
                   HorizontalAlignment="Center" Foreground="#444"
                   Grid.ColumnSpan="2" Grid.Row="0" Grid.Column="0" />

        <Controls:DataGrid x:Name="gridDrivers" ItemsSource="{Binding Drivers}"
            Grid.Row="1" Grid.Column="0">
        </Controls:DataGrid>


        <Controls:DataPager x:Name="dataPager1" Source="{Binding Drivers}"
            Grid.Row="1" Grid.Column="0" PageSize="5" />

        <toolkit:Chart x:Name="chartDrivers" Template="{StaticResource ChartLayoutBottom}"
         Grid.Row="1" Grid.Column="1">
            <toolkit:Chart.Series>
                <toolkit:PieSeries 
                        ItemsSource="{Binding Drivers}"
                        IndependentValueBinding="{Binding DriverIdentifier}" 
                        DependentValueBinding="{Binding ScoreImpact}"
                          />
            </toolkit:Chart.Series>
        </toolkit:Chart>
    </Grid>
</UserControl>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T08:23:20+00:00Added an answer on May 24, 2026 at 8:23 am

    From the investigation into the original Template of the Chart, it seems the you miss an EdgePanel object with the name “ChartArea” which is a TemplatePart of the Chart.

    Try using this template:

    <ControlTemplate x:Key="SomeKey" TargetType="toolkit:Chart">
        <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
                <toolkit:Title Content="{TemplateBinding Title}" Style="{TemplateBinding TitleStyle}"/>
                <Grid Margin="0,15,0,15" Grid.Row="1">
                    <!--Original definitions-->
                    <!--<Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="Auto"/>
                    </Grid.ColumnDefinitions>-->
                    <!--New definitions for the Legend to be bellow the Chart-->
                    <Grid.RowDefinitions>
                        <RowDefinition />
                        <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <!--Original definition, replaced by Grid.Row="1" on the Legend object-->
                    <!--Grid.Column="1"-->
                    <toolkit:Legend x:Name="Legend" Grid.Row="1" Header="{TemplateBinding LegendTitle}" Style="{TemplateBinding LegendStyle}"/>
                    <System_Windows_Controls_DataVisualization_Charting_Primitives:EdgePanel x:Name="ChartArea" Style="{TemplateBinding ChartAreaStyle}">
                        <Grid Style="{TemplateBinding PlotAreaStyle}" Canvas.ZIndex="-1"/>
                        <Border BorderBrush="#FF919191" BorderThickness="1" Canvas.ZIndex="10"/>
                    </System_Windows_Controls_DataVisualization_Charting_Primitives:EdgePanel>
                </Grid>
            </Grid>
        </Border>
    </ControlTemplate>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I want use html5's new tag to play a wav file (currently only supported
We're building an app, our first using Rails 3, and we're having to build
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.