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