我试图有一个< 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.
在C#/ XAML Windows Store应用程序中,技术上是不可能的吗?
你是否尝试将控制权放在边框内?只需将边框的角半径设置为150,您就可以完美控制.这是一个按钮的例子.
原文链接:https://www.f2er.com/windows/364205.html<Border BorderBrush="Black" BorderThickness="1" HorizontalAlignment="Center" Height="200" Margin="0,0" VerticalAlignment="center" Width="200" CornerRadius="150"> <Button x:Name="btnPlayback" Content="Play" HorizontalAlignment="Center" Height="200" Margin="0,0" VerticalAlignment="center" Width=" 200" BorderThickness="0" Click="btnPlayback_Click_1"/> </Border>