Export (0) Print
Expand All

XamlObjectReaderSettings.RequireExplicitContentVisibility Property

Gets or sets a value that determines whether writers that use the associated XamlObjectReader for context should use designer settings for writing content explicitly.

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

public bool RequireExplicitContentVisibility { get; set; }

Property Value

Type: System.Boolean
true to specify that writers that use this context should use designer settings for writing any output content in cases where IsWritePublic reports false; false if designer settings should be ignored.

This setting is queried internally. It influences the following behavior for the context that a XamlObjectReader passes to any XamlWriter:

  • The RequireExplicitContentVisibility behavior only applies for properties where IsWritePublic is false, AND when a ShouldSerialize pattern is unavailable for the property value.

  • If the statement in the first bullet point is true, AND RequireExplicitContentVisibility is true, then designer settings determine whether the property writes its output as content or the property is considered implicit. Access to designer settings is through internal APIs in .NET Framework XAML Services and is based on reading DesignerSerializationVisibilityAttribute from backing assemblies. In this case, the internal code checks for the value DesignerSerializationVisibility.Content and writes its output to the property. Otherwise, the content is considered implicit.

  • If the statement in the first bullet is true, AND RequireExplicitContentVisibility is false, the property always writes its output, and DesignerSerializationVisibilityAttribute from backing assemblies is irrelevant.

.NET Framework

Supported in: 4.5, 4

.NET Framework Client Profile

Supported in: 4

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

© 2014 Microsoft