圆形容器样式 [英] rounded container style
本文介绍了圆形容器样式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
现在任何一个如何为grid,canvas,dockpanel制作样式.任何其他容器控件,
添加样式以使其按样式四舍五入,
有什么帮助吗?还是无法做到?
谢谢您的帮助.
Hi,
any one now how make a style to grid , canvas, dockpanel.. any other container control,
add a style to make them rounded by style,
any help for this? or this can not be made?
thx for all your helps.
推荐答案
您可以在周围加上边框.
You can put a border around.
<Border BorderBrush="#FF000000" BorderThickness="1,1,1,1" CornerRadius="8,8,8,8">
<Grid/>
</Border>
有一个非常简单的解决方案.
您只需要Border
:
There is a much simper solution.
You don''t need anything butBorder
:
<border borderthickness="1.2 1.2 0 0" cornerradius="3.2" borderbrush="Black" removed="Yellow" height="20" margin="6">
<border borderthickness="0 0 1.2 1.2" cornerradius="3.2" borderbrush="White">
<combobox>
<comboboxitem>
<textblock removed="Red">Red</textblock>
</comboboxitem>
<comboboxitem>
<textblock removed="Yellow">Yellow</textblock>
</comboboxitem>
<comboboxitem>
<textblock removed="AliceBlue">Alice Blue</textblock>
</comboboxitem>
</combobox>
</border>
</border>
此代码示例演示了更高级的样式:某些元素周围的凹陷或凸起的圆形边框.
This code sample demonstrates more advanced style: recessed or elevated rounded border around some element.
thx家伙,但我想使用style来实现,以便在许多控件中重复使用,第二个想法是,我希望将此边框设置到网格,画布,停靠面板或任何其他容器控件之类的容器.
再次感谢您的帮助
thx guys i now this method but i want to do it with style , to re-use it in many controls, the second idea is that i want this border to a container like grid or canvas or dock panel or any other container control.
thx for you help again
这篇关于圆形容器样式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文