Skip to main content

Parse<T>(String, Assembly) Method

Parse XAML from a string.

Definition

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

public static T Parse<T>(
string xaml,
Assembly? localAssembly = null
)

Parameters

  String
>The string containing the XAML.
  Assembly  (Optional)
>Default assembly for clr-namespace:.

Type Parameters

The type of the returned object.

Return Value

T
The loaded object.

See Also

Reference

AvaloniaRuntimeXamlLoader Class
Parse Overload
Avalonia.Markup.Xaml Namespace