Svg controlThe Svg control is the simplest way to render an SVG in XAML:
<svg:Svg Path="/Assets/__tiger.svg" />
Common properties include:
PathSourceStretchStretchDirectionThe Skia-backed control also adds:
EnableCacheWireframeDisableFiltersZoomPanXPanYZoomToPoint(...)That makes it a better fit when you need interaction or viewport behavior.
SvgImageUse SvgImage when the target property expects IImage, for example on an Avalonia Image control:
<Image Source="{SvgImage /Assets/__AJ_Digital_Camera.svg}" />
Or through explicit object syntax:
<Image>
<Image.Source>
<svg:SvgImage Source="/Assets/__AJ_Digital_Camera.svg" />
</Image.Source>
</Image>
SvgSourceSvgSource is the reusable source object behind SvgImage.
Use it when:
The Skia-backed Svg control exposes:
var hits = svgControl.HitTestElements(new Point(x, y));
That method accepts control coordinates, not picture coordinates.