SetXamlSourceInfo(Object, XamlSourceInfo) Method
Associates XAML source information with the specified object for debugging or diagnostic purposes.
Definition
Namespace: Avalonia.Markup.Xaml.Diagnostics
Assembly: Avalonia.Markup.Xaml (in Avalonia.Markup.Xaml.dll)
- C#
- VB
- F#
public static void SetXamlSourceInfo(
Object obj,
XamlSourceInfo? info
)
Public Shared Sub SetXamlSourceInfo (
obj As Object,
info As XamlSourceInfo
)
static member SetXamlSourceInfo :
obj : Object *
info : XamlSourceInfo -> unit
Parameters
- Object
- The object to associate with the XAML source information. Cannot be null.
- XamlSourceInfo
- The XAML source information to associate with the object, or null to remove any existing association.
Remarks
This method is typically used to enable enhanced debugging or diagnostics by tracking the origin of XAML elements at runtime. If the same object is passed multiple times, the most recent source information will overwrite any previous value.
See Also
Reference
XamlSourceInfo Class
SetXamlSourceInfo Overload
Avalonia.Markup.Xaml.Diagnostics Namespace