1
我是XAML的新手,每当我读到它时,通常都会使用某种容器作为根视图(StackLayout,ContentPage,ContentView,RelativeLayout等)。Xamarin.Forms XAML图像作为根元素
但是,我遇到了这个使用Image作为其根的XAML。我们为什么要那样做?
<?xml version="1.0" encoding="utf-8" ?>
<Image
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:r="clr-namespace:My.Resources;assembly=My.Resources"
x:Class="My.Views.Buttons.MyView"
Source="MyImage.png"/>
我想替换这个图像的FFImageLoading.CachedImage但我需要添加FFImageLoading的xmlns命名空间,但我不能,因为命名空间的图片标签里面,不在外面。
@SharadaGururay非常感谢:)。有用 – pixel