Ich benutze das Nugget-Paket SVG.Forms.Plugin.Abstractions, ich habe das XAML unten von einem einfachen Beispiel kopiert, kann aber nicht die SVG anzeigen. Das Bild befindet sich in einem 'images'-Ordner innerhalb der TestApp-Anwendung und die Build-Aktion ist Embedded Resource. SvgAssebly ist im ViewModel an die öffentliche Assembly gebunden. Ich bekomme nur einen leeren Bildschirm mit dem Titeltext oben. Kann jemand etwas offensichtlich falsch sehen?Verwenden von SVG-Bildern in Xamarin-Formularen
public Assembly SvgAssembly
{
get { return typeof(App).GetTypeInfo().Assembly; }
}
XAML:
<?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="TestApp.MainPage"
xmlns:artina="clr-namespace:UXDivers.Artina.Shared;assembly=UXDivers.Artina.Shared"
xmlns:local="clr-namespace:TestApp;assembly=TestApp" Title="{ artina:Translate PageTitle}" BackgroundColor="{DynamicResource BasePageColor}"
xmlns:abstractions="clr-namespace:SVG.Forms.Plugin.Abstractions;assembly=SVG.Forms.Plugin.Abstractions">
<ContentPage.Content>
<StackLayout>
<abstractions:SvgImage
SvgAssembly="{Binding SvgAssembly }"
SvgPath="TestApp.images.brand.svg"
Width="200"
Height="200" />
</StackLayout>
</ContentPage.Content>
</ContentPage>
was Geräteplattform konzentrieren Sie sich auf? – LeRoy