อ่านในภาษาอังกฤษ แก้ไข

แชร์ผ่าน


XamlReaderSettings.AllowProtectedMembersOnRoot Property

Definition

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.

C#
public bool AllowProtectedMembersOnRoot { get; set; }

Property Value

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

Remarks

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.

Applies to

ผลิตภัณฑ์ เวอร์ชัน
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10