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(...)InteractionAnimationBackendAnimationFrameIntervalAnimationPlaybackRateActualAnimationBackendAnimationBackendFallbackReasonThat makes it a better fit when you need interaction or viewport behavior.
For animated SVG, use the host playback properties directly on the control:
<svg:Svg Path="/Assets/animated.svg"
AnimationBackend="Default"
AnimationPlaybackRate="1"
AnimationFrameInterval="0:0:0.016" />
On Avalonia, Default prefers the retained NativeComposition path when it is supported by both the host and the loaded SVG scene.
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.
For routed pointer events and animation playback details, see Interaction and Animation.