【发布时间】:2019-11-30 07:26:48
【问题描述】:
我制作了一个 xamarin 表单登录屏幕,我想在其中放置一个徽标,但它没有显示。我已按照以下链接上的说明进行操作:https://docs.microsoft.com/en-us/xamarin/xamarin-forms/user-interface/images?tabs=windows#using-xaml
我正在使用 xaml
我尝试按照上面的链接进行操作,但显示的只是一张空白图片,如果我使用以下链接:
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="MaisonNickel.MainPage"
Title="MainPage">
<ContentPage.Content>
<Image x:Name="cat" Aspect="AspectFit"/>
</ContentPage.Content>
</ContentPage>
也没有显示错误,我检查了过滤器,这是一个不刷新的 vs 错误
【问题讨论】:
-
Xamarin Forms Previewer 有多个错误我建议您开始检查设备...
-
您似乎没有在图像中添加 Source,您是在后面的代码中进行的吗?如果 Image 组件中没有设置图像源,则不会显示任何内容。
-
如何添加源?
-
@MateusW。如何添加?
-
作为答案发布。
标签: xaml xamarin xamarin.forms