【发布时间】:2016-11-01 01:12:25
【问题描述】:
我正在尝试构建一个简单的应用程序以在堆栈布局中显示图像, 这是代码
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="HelloWorld.Page1">
<StackLayout BackgroundColor="White">
<Image Source="http://placehold.it/300x300"/>
</StackLayout>
</ContentPage>
但由于某种原因,它根本不显示图像。 有没有人看到这里有问题。
谢谢!!
【问题讨论】:
-
当我将该网址粘贴到浏览器中时,我被重定向到placeholdit.imgix.net/…。尝试使用它。图像处理程序不太可能遵循重定向。
-
我尝试添加此链接lorempixel.com/1920/1080/nature/3,但仍然无法正常工作
-
确保您已更新项目中的 Xamarin.Forms nuget 包。我只是拿了那个确切的代码,它起作用了。我在 Windows UWP 和 iOS 上进行了测试。
标签: c# xaml xamarin xamarin.android xamarin.forms