wpf中圆角组合框的样本
问题描述:
你好朋友
有没有可能在wpf中创建样本圆角组合框。如果有意思请通过电话
hello friends
is there any possible to create sample rounded corner combobox in wpf. if there means please tel the sample
答
-SA
http://stackoverflow.com/questions/1152868/wpf-combobox-rounded-corners [ ^ ]
除了Border
之外,您不需要任何其他内容:
You don't need anything butBorder
:
<Border BorderThickness="1.2 1.2 0 0" CornerRadius="3.2" BorderBrush="Black" Background="Yellow" Height="20" Margin="6">
<Border BorderThickness="0 0 1.2 1.2" CornerRadius="3.2" BorderBrush="White" Padding="1">
<TextBlock Width="130" Height="30" Background="Transparent" TextAlignment="Center">Some Text</TextBlock>
</Border>
</Border>
你必须自己编写自定义模板从头开始。使第一个控件在模板中成为边框,边角半径设置为大于0
You have to write your own custom template from scratch. make your first control a border in the template a border with corner radius set to something greater than 0