Compartir a través de


IXRStyle::GetIsSealed (Compact 2013)

3/28/2014

This method retrieves a value that indicates whether this style is read-only.

Syntax

virtual HRESULT STDMETHODCALLTYPE GetIsSealed(
    __out bool* pIsSealed
) = 0;

Parameters

  • pIsSealed
    [out] Pointer to a Boolean value that indicates whether the style is read-only. This value is true if the style is read-only; otherwise it is false.

Return Value

Returns an HRESULT that indicates success or failure.

Remarks

A style is sealed after it is applied for the first time.

You can change the values of individual properties that were set in a style when it is unsealed. For example, you can call IXRControl::SetTemplate at run time to override a property value set in this style for an IXRControl object. Or, you can retrieve the collection of property-setting objects and add to it. This collection is retrieved by calling IXRStyle::GetSetters. However, as soon as a loaded object uses that style, the object raises the Loaded event and the style is sealed.

You can detect whether it is sealed by calling this method. When you try to change a property of a sealed style, an exception is thrown.

.NET Framework Equivalent

System.Windows.Style.IsSealed

Requirements

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

IXRStyle