如何解决如何在 iOS 中的 Xamarin 按钮上将图像左对齐并将文本对齐到中心?
我想将文本居中对齐,但图像在左侧。我已经尝试过使用 HorizontalAlignment,但它同时对齐了两者。怎么做?
解决方法
尝试使用 ButtonContentLayout.ImagePosition
属性:
你知道我如何从 ButtonRenderer 中的 Control 设置它吗?
您可以更改渲染器中按钮的 try:
guild = ctx.guild
if not guild.has_role(name="Muted"):
await guild.create_role(name="Muted")
except Exception as e:
print(e)
await ctx.send("something went wrong")
和 ImageEdgeInsets
以更改图像和标题位置:
TitleEdgeInsets
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。