Skip to main content
Home Forums Silverlight Programming Silverlight Controls and Silverlight Toolkit How do you make the background of a pieseries chart invisible and lose the legend?
1 replies. Latest Post by SharpGIS on June 26, 2009.
(0)
mathiasX_
Member
14 points
55 Posts
06-24-2009 7:06 PM |
I have a pieseries chart that I need to have blend in with the ToolWindow is sits in. Here is the code so far for this control...
<sd:WindowGroup Background="#FF37466D" > <sd:ToolWindow Title="Net Assets" x:Name="NetAssets" Background="#FF37466D"> <chart:Chart x:Name="AssetChart" BorderBrush="Gray" Margin="1" Background="#FF37466D" Title="" > <chart:PieSeries IndependentValueBinding="{Binding Path=acctBalance}" DependentValueBinding="{Binding Path=acctBalance}" AnimationSequence="FirstToLast" Background="#FF37466D" IsSelectionEnabled="False" Visibility="Visible" Foreground="#FF37466D"> </chart:PieSeries> </chart:Chart> </sd:ToolWindow>
</sd:WindowGroup>
SharpGIS
Contributor
3387 points
611 Posts
06-26-2009 3:08 AM |
The trick is to open your page.xaml that contains the piechart up in Blend. Right-click the piechart in the list on the left, and select to edit a copy of the template.
Now start browsing through the items in the piechart (you might have to repeat the process for sub elements), and delete the parts that you don't need like the legend. I've succesfully been able to split the piechart up in separate legend and piechart controls using this approach, and also completely restyle background, border etc.
If you get stuck, I recommend that you google for tutorials on templating controls in blend. It is really powerfull stuff when you get into it.