带有线性渐变填充的边框在运行时不显示边框

时间:2011-12-26 22:56:56

标签: silverlight xaml

这是我的XAML

<Border Grid.Column="1" BorderBrush="Black" Margin="5">
                <Border.Background>
                    <LinearGradientBrush EndPoint=".5,1" StartPoint=".5,0">
                        <GradientStop Color="#FFFFFFFF" Offset="0"/>
                        <GradientStop Color="#FFf3f3f3" Offset="0.48"/>
                        <GradientStop Color="#FFededed" Offset="0.51"/>
                        <GradientStop Color="#FFFFFFFF" Offset="1"/>
                    </LinearGradientBrush>
                </Border.Background>
            </Border>

我可以在设计时看到边框但是在运行时它没有显示。为什么呢?

Design Time as expected Run time - can't see border

它有什么问题?!

1 个答案:

答案 0 :(得分:0)

您需要设置BorderThickness