# Mouse Over Style

## Content



The following example shows how to create a style that sets the **Stroke** property for a PlotElement to _Black_:

```xml
<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>
```


> type=note
> **Note**: When you set the TargetType of your style to the PlotElement type without assigning the style with an x:Key, the style gets applied to both of your PlotElement elements.

To apply the mouseover styles to the data series you can use set the [SymbolStyle](/componentone/api/wpf/online-chart/dotnet-framework-api/C1.WPF.C1Chart.4.6.2/C1.WPF.C1Chart.DataSeries.SymbolStyle.html) property like the following:

```xml
<c1c:DataSeries … SymbolStyle="{StaticResource mouseOver}"/>
```

## See Also

[Chart Themes](/componentone/docs/wpf/online-chart/overview/ChartFeatures/StyleandAppearance/ChartThemes)