Application.Current 属性

定义

获取当前 ApplicationAppDomain 对象。Gets the Application object for the current AppDomain.

public:
 static property System::Windows::Application ^ Current { System::Windows::Application ^ get(); };
public static System.Windows.Application Current { get; }
member this.Current : System.Windows.Application
Public Shared ReadOnly Property Current As Application

属性值

当前 ApplicationAppDomain 对象。The Application object for the current AppDomain.

注解

Application 是一种每AppDomain 单独类型,该类型实现静态 Current 属性以提供对当前 AppDomainApplication 实例的共享访问。Application is a per-AppDomain singleton type that implements the static Current property to provide shared access to the Application instance for the current AppDomain. 此设计保证 Application管理的状态(包括共享资源和状态)可从单个共享位置获得。This design guarantees that state managed by Application, including shared resources and state, is available from a single, shared location.

此属性是线程安全的,可从任何线程获得。This property is thread safe and is available from any thread.

适用于