Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I posted a similar question and got the following answer, which really helped me.</p> <pre><code>&lt;ch:Chart Margin="56,21,50,72" Title="MyChart" DataContext="{Binding ElementName=Window, Mode=OneWay}" Style="{StaticResource controlStyle}" &gt; &lt;ch:AreaSeries Name="DefaultArea" ItemsSource="{Binding Path=Key}" IndependentValueBinding="{Binding Key}" DependentValueBinding="{Binding Value}" Opacity="1" Title="111111" &gt; &lt;ch:AreaSeries.Style&gt; &lt;Style TargetType="ch:AreaSeries"&gt; &lt;Setter Property="IsTabStop" Value="False"/&gt; &lt;Setter Property="Template"&gt; &lt;Setter.Value&gt; &lt;ControlTemplate TargetType="ch:AreaSeries"&gt; &lt;Canvas x:Name="PlotArea"&gt; &lt;Path Data="{TemplateBinding Geometry}" StrokeThickness="3" Fill="Pink" Style="{TemplateBinding PathStyle}" Opacity="1" /&gt; &lt;/Canvas&gt; &lt;/ControlTemplate&gt; &lt;/Setter.Value&gt; &lt;/Setter&gt; &lt;/Style&gt; &lt;/ch:AreaSeries.Style&gt; &lt;/ch:AreaSeries&gt; &lt;ch:AreaSeries Name="PersonnelArea" ItemsSource="{Binding Path=Key}" IndependentValueBinding="{Binding Key}" DependentValueBinding="{Binding Value}" Opacity="1" &gt; &lt;ch:AreaSeries.Style&gt; &lt;Style TargetType="ch:AreaSeries"&gt; &lt;Setter Property="IsTabStop" Value="False"/&gt; &lt;Setter Property="Template"&gt; &lt;Setter.Value&gt; &lt;ControlTemplate TargetType="ch:AreaSeries"&gt; &lt;Canvas x:Name="PlotArea"&gt; &lt;Path Data="{TemplateBinding Geometry}" StrokeThickness="3" Fill="Yellow" Style="{TemplateBinding PathStyle}" Opacity="1" /&gt; &lt;/Canvas&gt; &lt;/ControlTemplate&gt; &lt;/Setter.Value&gt; &lt;/Setter&gt; &lt;/Style&gt; &lt;/ch:AreaSeries.Style&gt; &lt;/ch:AreaSeries&gt; &lt;/ch:Chart&gt; </code></pre> <p>You can also set the style as Ressource in XAML and then assign it dynamically in the code behind. Here my original question with the Answer: <a href="https://stackoverflow.com/questions/16771936/wpf-areaseries-how-to-change-background-opacity">WPF AreaSeries: How to change background opacity?</a></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload