XamlReaderSettings::AllowProtectedMembersOnRoot Property

Gets or sets a value that indicates whether the root object may include members that have a protected code access model when it reports the XAML type representation.

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

property bool AllowProtectedMembersOnRoot {
	bool get ();
	void set (bool value);

Property Value

Type: System::Boolean
true if the root object may include members that have a protected code access model; otherwise, false.

This setting is relevant to some XAML implementations such as WPF where the root object is often a "factory" for generating an instance from a pattern type, when that pattern type is not always a practical object instance. For example, a root of UserControl has a certain meaning for WPF and Silverlight application models, and UserControl might have protected properties (UserControl.Content) that the parser needs access to. Tools and design surfaces also need access to such properties. These cases should generally be reported to the XAML type system as writable properties even though they have protected access in the backing type system.

.NET Framework

Supported in: 4.6, 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.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2014 Microsoft