Skip to main content

Load(String, Assembly, Object, Uri, Boolean) Method

Loads XAML from a string.

Definition​

Namespace: Avalonia.Markup.Xaml
Assembly: Avalonia.Markup.Xaml.Loader (in Avalonia.Markup.Xaml.Loader.dll)

public static Object Load(
string xaml,
Assembly? localAssembly = null,
Object? rootInstance = null,
Uri? uri = null,
bool designMode = false
)

Parameters​

  String
The string containing the XAML.
  Assembly  (Optional)
Default assembly for clr-namespace:.
  Object  (Optional)
The optional instance into which the XAML should be loaded.
  Uri  (Optional)
The URI of the XAML being loaded.
  Boolean  (Optional)
Indicates whether the XAML is being loaded in design mode.

Return Value​

Object
The loaded object.

See Also​

Reference​

AvaloniaRuntimeXamlLoader Class
Load Overload
Avalonia.Markup.Xaml Namespace