我有这段代码来实现内部阴影。
不知何故,它包括TextBlock
等等。我不需要它。我只需要 INNER SHADOW。
它靠近此处描述的问题,但我有内部阴影......
所以我想保留内部阴影,但不要将其应用于字体等。
请帮我修复它。谢谢!
<DataTemplate x:Key="RSSItemTemplate">
<Border Background="LightGray" BorderBrush="DarkGray" Margin="0,0,0,5" BorderThickness="1" ClipToBounds="True">
<Border Background="Transparent" BorderBrush="Black" BorderThickness="1" Margin="-2">
<Border.Effect>
<DropShadowEffect ShadowDepth="0" BlurRadius="5" />
</Border.Effect>
<Grid>
<StackPanel Orientation="Vertical" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<Image>
</Image>
<StackPanel Orientation="Vertical" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<TextBlock Text="{Binding Path=PublishDate}" Margin="0,0,5,0" />
<TextBlock Text="{Binding Path=Title}" TextWrapping="Wrap" />
</StackPanel>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<TextBlock Text="{Binding Path=Description}" Margin="0,5,0,0" TextWrapping="Wrap" />
</StackPanel>
</StackPanel>
</StackPanel>
</Grid>
</Border>
</Border>
</DataTemplate>
</UserControl.Resources>
<Grid>
<ItemsControl x:Name="MainRoot" ItemTemplate="{StaticResource RSSItemTemplate}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
</Grid>