0

i have a border that has a DropShadowEffect. this is also being applied to all borders within the current border element. i have a custom style with the key border left.

enter image description here

 <Style x:Key="borderLeft" TargetType="Border">
            <Setter Property="Effect">
                <Setter.Value>
                    <DropShadowEffect Direction="180"/>    
                </Setter.Value>
            </Setter>
        </Style>

Then this key is being called on the border which contains a stack panel with text boxes, however the text boxes are also including the drop shadow effect.

    <Border Style="{StaticResource borderLeft}" BorderThickness="2 0 0 0" BorderBrush="Black">
                    <StackPanel x:Name="stack" HorizontalAlignment="Left" Height="498" Margin="10,52,0,0" VerticalAlignment="Top" Width="373">
                        <TextBox />
</StackPanel>
    </Border>

The text box also has its own styling and could this be effecting it?

 <Style TargetType="{x:Type TextBox}">       
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TextBoxBase}">
                    <Border CornerRadius="4" BorderThickness="2" Background="White" BorderBrush="Black" >
                        <ScrollViewer Margin="0" x:Name="PART_ContentHost"/>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>    
    </Style>
Bish25
  • 606
  • 1
  • 10
  • 35
  • 1
    Did you read this?: https://stackoverflow.com/questions/807420/how-do-i-apply-an-effect-to-a-border-but-not-to-its-contents-in-wpf – mm8 Jun 02 '17 at 14:41
  • @mm8 Thats exactly what i was after, thank you – Bish25 Jun 02 '17 at 14:44

0 Answers0