作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我已经尝试过使用<Grid/>
(内部具有交互式内容,而不仅仅是图像)裁剪了带有圆角的(可以使用<Border/>
或<Rectangle/>
进行任何操作)。
我尝试了多种解决方案,但没有一个与Windows Store App兼容。
无刷:
- RadialGradientBrush is not supported in a Windows App project.
- DrawingBrush is not supported in a Windows App project.
- The type 'VisualBrush' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built.
- The attachable property 'OpacityMask' was not found in type 'Image'.
- The attachable property 'OpacityMask' was not found in type 'StackPanel'.
- The attachable property 'OpacityMask' was not found in type 'Grid'.
- The property 'RadiusX' was not found in type 'RectangleGeometry'.
- MultiBinding is not supported in a Windows App project.
最佳答案
您是否尝试过将控件置于边界内?只需将边框的拐角半径设置为150,您就可以实现完美的圆形控制。这是一个带有按钮的示例。
<Border BorderBrush="Black" BorderThickness="1" HorizontalAlignment="Center" Height="200" Margin="0,0,0,0" VerticalAlignment="center" Width="200" CornerRadius="150">
<Button x:Name="btnPlayback" Content="Play" HorizontalAlignment="Center" Height="200" Margin="0,0,0,0" VerticalAlignment="center" Width=" 200" BorderThickness="0" Click="btnPlayback_Click_1"/>
</Border>
关于xaml - 如何在Windows Store App中裁剪带有圆角的内容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16341788/
我是一名优秀的程序员,十分优秀!