弯曲 silverlight 列表框控件的边框:
我只想弯曲 silverlight 列表框边框的末端。
我做错了什么吗,因为我无法获得边框曲线:
<Style TargetType="ListBox" x:Key="listboxStyle">
<Setter Property="Padding" Value="1"/>
<Setter Property="Background" Value="Transparent" />
<Setter Property="HorizontalContentAlignment" Value="Left" />
<Setter Property="VerticalContentAlignment" Value="Top" />
<Setter Property="IsTabStop" Value="False" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="TabNavigation" Value="Once" />
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ListBox">
<Grid Background="White">
<Border Background="White" BorderThickness="0" CornerRadius="10">
<ScrollViewer Background="White" x:Name="ScrollViewerElement" Padding="{TemplateBinding Padding}">
<ItemsPresenter />
</ScrollViewer>
</Border>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
最佳答案
好的,我完成了,无需设置列表框控件的样式。
<Border BorderBrush="White" BorderThickness="0" CornerRadius="5" Background="White" >
<ListBox x:Name="lstEnities" BorderThickness="0" Margin="5" Grid.Row="0"></ListBox>
</Border>
关于c# - silverlight列表框控件的边框曲线,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2385398/