XamlObjectReaderSettings.RequireExplicitContentVisibility Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets a value that determines whether writers that use the associated XamlObjectReader for context should use designer settings for writing content explicitly.
public:
property bool RequireExplicitContentVisibility { bool get(); void set(bool value); };
public bool RequireExplicitContentVisibility { get; set; }
member this.RequireExplicitContentVisibility : bool with get, set
Public Property RequireExplicitContentVisibility As Boolean
Property Value
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.
Remarks
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 aShouldSerialize
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 isfalse
, the property always writes its output, and DesignerSerializationVisibilityAttribute from backing assemblies is irrelevant.