加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Windows > 正文

xaml – 如何在Windows Store App中用圆角剪辑内容

发布时间:2020-12-14 04:35:48 所属栏目:Windows 来源:网络整理
导读:我试图有一个 Grid / (与内部的交互式内容,而不仅仅是一个图像)用圆角裁剪(一个 Border /或 Rectangle /gt,无论什么工作). 我尝试过多种解决方案,但并没有与 Windows Store App兼容. 无刷: RadialGradientBrush is not supported in a Windows App project.
我试图有一个< Grid /> (与内部的交互式内容,而不仅仅是一个图像)用圆角裁剪(一个< Border />或< Rectangle /&gt,无论什么工作). 我尝试过多种解决方案,但并没有与 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,您就可以完美控制.这是一个按钮的例子.
<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>

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读