Silverlight 4 边框剪辑
Silverlight 4 中是否可以创建一个圆角边框来剪辑任何子 UI 元素?到目前为止,我尝试通过将按钮设置为边框控件的子元素来实现此目的,但是当我设置圆角半径以在边框中创建圆角时,按钮不会被剪切。
Is it possible in Silverlight 4 to create a border with rounded corners that clips any of it child UI Element? So far I have attempted to do so by setting a button as a child element of a border control but the buttons does not get clipped when I set the corner radius to create rounded corners in the border.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
查看 ClippingBehavior,它是 Expression Blend 示例的一部分代码丛。这是一种 Blend 行为,因此要添加它,您必须从 Blend SDK 引用 System.Windows.Interactivity.dll 并将该行为拖放到 Blend 中的元素上或将其添加到 XAML 中:
这是添加圆角的简单且可重用的方法/clipping 到任何 UI 元素。
Take a look at the ClippingBehavior that is part of the Expression Blend Samples on CodePlex. It's a Blend behavior, so to add it you have to reference System.Windows.Interactivity.dll from the Blend SDK and drop the behavior on the element in Blend or add it in XAML:
This is a straightforward and reusable way to add rounded corners/clipping to any UI Element.