I have set a Border Style into a UserControl.Resources with a x:key. If i set the Style into a Border all Labels get the same DropShadowEffect. Is it somehow possible that the style is only set on a border?
Thats my Code:
<UserControl x:Class="PetGameUC"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:CatOrDog"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<UserControl.Resources>
<Style x:Key="BorderStyler1" TargetType="{x:Type Border}">
<Setter Property="Effect">
<Setter.Value>
<DropShadowEffect BlurRadius="3" ShadowDepth="0" Color="White"/>
</Setter.Value>
</Setter>
</Style>
</UserControl.Resources>
<Grid>
<Border>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="100"/>
<RowDefinition Height="300"/>
</Grid.RowDefinitions>
<Grid Grid.Row="0">
<Border Style="{StaticResource BorderStyler1}">
<Label Content="SomeText"/>
</Border>
</Grid>
<Border Grid.Row="1" BorderBrush="Black" BorderThickness="2">
</Border>
</Grid>
</Border>
</Grid>
</UserControl>