Hello I have a ScrollBar Template as per below – only relevant portion shown:
<ControlTemplate x:Key="VerticalScrollBar" TargetType="{x:Type ScrollBar}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition MaxHeight="18"/>
<RowDefinition Height="0.00001*"/>
<RowDefinition MaxHeight="18"/>
</Grid.RowDefinitions>
<Rectangle Height="35" Width="19" Fill="{StaticResource GreenTeaBrush}" Margin="-35" VerticalAlignment="Top"/>
<Border....
Now the Rectangle Portion:
<Rectangle Height="35" Width="19" Fill="{StaticResource GreenTeaBrush}" Margin="-35" VerticalAlignment="Top"/>
I only want that to show up on DataGrids OR i would like this enter ControlTemplate to only work on the ScrollBars of DataGrids.
Any help would be greatly appreciated! Thanks!
You can nest Styles, the following style is implicitly applied to DataGrids, it contains a style for ScrollBars which is also applied implicitly: