Export (0) Print
Expand All

Style.IsSealed Property

Gets a value that indicates whether the style is read-only and cannot be changed.

Namespace:  System.Windows
Assembly:  System.Windows (in System.Windows.dll)

public bool IsSealed { get; }

Property Value

Type: System.Boolean
true if the style is read-only; otherwise, false.

You can change the values of individual properties that have been set within a style. For example, you can set the Template property at run time even if this property has been set by a style. Or you can add setters to the collection in Setters. However, as soon as that style is placed in use by a loaded object, the Style should be considered sealed. You can detect this state by checking the value of IsSealed for the Style. A style is considered to be in use as soon as it is referenced by a loaded object that is connected to the object tree and the Silverlight root visual. This point in time can be detected when the object where the Style property is set raises its Loaded event.

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show:
© 2014 Microsoft