XamlOptionalChanges Class

Definition

Provides static methods that let apps opt into or out of optional breaking changes before XAML initialization. These changes may improve performance or fix behavior, but could break compatibility with existing code.

public ref class XamlOptionalChanges sealed
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.UI.Xaml.WinUIContract, 720896)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class XamlOptionalChanges final
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.UI.Xaml.WinUIContract), 720896)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class XamlOptionalChanges
Public NotInheritable Class XamlOptionalChanges
Inheritance
Object Platform::Object IInspectable XamlOptionalChanges
Attributes

Remarks

All methods on this class must be called before XAML is initialized (before calling Application.Start). Once Lock is called or XAML initializes, no further changes can be made.

Methods

Name Description
DisableChange(XamlChangeId)

Disables the specified optional XAML behavior change.

EnableChange(XamlChangeId)

Enables the specified optional XAML behavior change.

IsChangeEnabled(XamlChangeId)

Returns whether the specified optional XAML behavior change is currently enabled.

IsLocked()

Returns whether optional XAML changes have been locked and can no longer be modified.

Lock()

Locks optional XAML changes so that no further changes can be enabled or disabled.

Applies to

See also