The following example shows how to create a style that sets the Stroke property for a PlotElement to Black:
XAML |
Copy Code
|
---|---|
<Window.Resources> ... <Style x:Key="mouseOver" TargetType="{x:Type c1c:PlotElement}"> <!-- Default black outline --> <Setter Property="Stroke" Value="Black" /> <Style.Triggers> <!-- When mouse is over the element make thick red outline --> <Trigger Property="IsMouseOver" Value="true"> <Setter Property="Stroke" Value="Red" /> <Setter Property="StrokeThickness" Value="3" /> <Setter Property="Canvas.ZIndex" Value="1" />” </Trigger> </Style.Triggers> </Style> </Window.Resources> |
To apply the mouseover styles to the data series you can use set the SymbolStyle property like the following:
XAML |
Copy Code
|
---|---|
<c1c:DataSeries … SymbolStyle="{StaticResource mouseOver}"/>
|