在WPF中,当boder的边框色与boder的背景为同一个色时,在整个border下方会有一条细线,如下图:
<Border x:Name="bdMain" Background="{DynamicResource QueryCouponsBackground}" BorderThickness="1,1,1,3" CornerRadius="8"> </Border>
解决办法:
<Border x:Name="bdMain" CornerRadius="{Binding ElementName=secondBorder,Path=CornerRadius}" Background="{Binding ElementName=secondBorder,Path=Background}"> <Border x:Name="secondBorder" Background="{DynamicResource QueryCouponsBackground}" BorderThickness="1,1,1,3" CornerRadius="8" BorderBrush="{DynamicResource QueryCouponsBackground}" > </Border> </Border>