Jump to content
Software FX Community

Remove Background


wpftester

Recommended Posts

 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.

Link to comment
Share on other sites

 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.

 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...