Method LoadExistingEx
LoadExistingEx(Stream, object, Flags, string?)
Populates an existing root object with the object property values created from a source XAML.
public static object LoadExistingEx(Stream xamlStream, object existingObject, UixmlLoader.Flags flags = (UixmlLoader.Flags)0, string? resName = null)
Parameters
xamlStreamStreamexistingObjectobjectflagsUixmlLoader.FlagsresNamestring
Returns
LoadExistingEx(string, object, Flags, string?)
Loads XAML markup into an existing object, updating its properties and state according to the provided XAML definition.
public static object LoadExistingEx(string xaml, object existingObject, UixmlLoader.Flags flags = (UixmlLoader.Flags)0, string? resName = null)
Parameters
xamlstringThe XAML markup string that defines the properties and structure to apply to the existing object. Cannot be null.
existingObjectobjectThe object instance to be updated with values from the XAML markup. Cannot be null.
flagsUixmlLoader.FlagsOptional flags that control aspects of the loading behavior. The default is 0.
resNamestringAn optional resource name used for reporting load exceptions. May be null.
Returns
- object
The existing object after it has been updated with the values from the XAML markup.
Remarks
If an exception occurs during the loading process, it is reported using the DefaultReportLoadException method. The method always returns the existing object, even if an error occurs.