wpftester Posted November 10, 2009 Report Share Posted November 10, 2009 Hi, I`m currently styling a 3D chart PIE. I only need the PIE and want to remove the background, because the pie should be displayed on my own background (the pie chart is a user controly and is integrated in my main program which has a background that i want to use). i`ve already done this: chart1.Background = null;chart1.Palette = null;chart1.BorderBrush = null;chart1.Border = null; but there is still some background! sry for my bad english. Quote Link to comment Share on other sites More sharing options...
juanZ Posted November 10, 2009 Report Share Posted November 10, 2009 Hi, try to use the "Floating" style in the Chart. This style has a plain color background, so you can paint it white if you need. There will be no gradient color. Something like this: <Window x:Class="WpfApplication1.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1" Loaded="Window_Loaded" Height="396" Width="589" xmlns:cfx="http://schemas.softwarefx.com/chartfx/wpf/80" xmlns:cfxaddmotifs="http://schemas.softwarefx.com/chartfx/wpf/80/ext/motifs"> <cfx:Chart Height="350" Name="chart1" Width="532" Style="{x:Static cfxaddmotifs:Floating.Style}"></cfx:Chart></Window> You can perform this automatically by using the Chart Smart Tag and follow the Motif and Style Wizard. Hope this helps. Quote Link to comment Share on other sites More sharing options...
JuanC Posted November 10, 2009 Report Share Posted November 10, 2009 Actually you can also use the Basic style which allows you to specify background/border brushes needed as follows chart1.Style = ChartFX.WPF.Motifs.Basic.Style You can also set it in XAML similar to the previous post. The Floating style will ignore border/background but it also adds some additional behaviors where we try to inherit other colors from your app. Also note that setting Palette to null is ignored so you should not do that. JuanC Quote Link to comment Share on other sites More sharing options...
wpftester Posted November 11, 2009 Author Report Share Posted November 11, 2009 Actually you can also use the Basic style which allows you to specify background/border brushes needed as follows chart1.Style = ChartFX.WPF.Motifs.Basic.Style You can also set it in XAML similar to the previous post. The Floating style will ignore border/background but it also adds some additional behaviors where we try to inherit other colors from your app. Also note that setting Palette to null is ignored so you should not do that. JuanC Thank you ! This works as I needed! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.