【发布时间】:2017-11-03 16:42:31
【问题描述】:
在我的 Xamarin.Forms PCL 项目中,我正在尝试创建一个按钮,其文本显示在图像下方。但是只要我添加图像(这是一个矢量图像 - 并且无法指定大小?) - 文本就会消失。仅显示图像。
关于为什么显示图像时文本消失的任何想法?
我的代码:
<?xml version="1.0" encoding="UTF-8"?>
<Button xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="MyProj.Views.ToolbarButtonView"
Text="hello"
Image="myvectorimage"
ContentLayout="Top,1" >
</Button>
感谢您的帮助!
【问题讨论】:
-
添加一个图像,其中包含您想要观看按钮和实际按钮的表单。了解更多详情。
标签: c# ios xamarin xamarin.forms