diff --git a/src/Dock.Avalonia/Controls/MarkupExtensions/LoadExtension.cs b/src/Dock.Avalonia/Controls/MarkupExtensions/LoadExtension.cs index 0c019c8d9..988c72eb1 100644 --- a/src/Dock.Avalonia/Controls/MarkupExtensions/LoadExtension.cs +++ b/src/Dock.Avalonia/Controls/MarkupExtensions/LoadExtension.cs @@ -36,8 +36,7 @@ public LoadExtension(Uri source) if (serviceProvider.GetService(typeof(IUriContext)) is IUriContext uriContext) { var baseUri = uriContext.BaseUri; - var loader = new AvaloniaXamlLoader(); - var obj = loader.Load(Source, baseUri); + var obj = AvaloniaXamlLoader.Load(Source, baseUri); return obj; } return default;