XamlLanguage.Shared 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
XamlDirective
Shared获取 XAML 的指令。
public:
static property System::Xaml::XamlDirective ^ Shared { System::Xaml::XamlDirective ^ get(); };
public static System.Xaml.XamlDirective Shared { get; }
static member Shared : System.Xaml.XamlDirective
Public Shared ReadOnly Property Shared As XamlDirective
属性值
XamlDirective XAML 指令的 AShared。
注解
指令 Shared (当它设置为 true)指定在字典中找到项时,对对象的引用应始终返回单一实例而不是新实例。 此行为与使用 XAML 的特定框架可能用作共享内容或模板机制的源的概念有关。
Shared未在 [MS-XAML] 中指定,而是WPF和 .NET Framework 版本 3.0 和版本 3.5 中 XAML 的 x 命名空间定义的行为的一部分。