ResourceManager 类

定义

提供对应用资源映射和更高级的资源功能的访问权限。

public ref class ResourceManager sealed
/// [Windows.Foundation.Metadata.Activatable(65536, "Microsoft.ApplicationModel.Resources.MrtContract")]
/// [Windows.Foundation.Metadata.Activatable(Microsoft.ApplicationModel.Resources.IResourceManagerFactory, 65536, "Microsoft.ApplicationModel.Resources.MrtContract")]
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.ApplicationModel.Resources.MrtContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class ResourceManager final
[Windows.Foundation.Metadata.Activatable(65536, "Microsoft.ApplicationModel.Resources.MrtContract")]
[Windows.Foundation.Metadata.Activatable(typeof(Microsoft.ApplicationModel.Resources.IResourceManagerFactory), 65536, "Microsoft.ApplicationModel.Resources.MrtContract")]
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.ApplicationModel.Resources.MrtContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class ResourceManager
function ResourceManager(fileName)
Public NotInheritable Class ResourceManager
继承
Object Platform::Object IInspectable ResourceManager
属性

构造函数

ResourceManager()

使用默认设置创建 ResourceManager 对象。

ResourceManager(String)

创建 ResourceManager 对象。

属性

MainResourceMap

获取与当前正在运行的应用main包关联的 ResourceMap

方法

CreateResourceContext()

使用默认设置创建 ResourceContext

事件

ResourceNotFound

由于找不到指定的资源而尝试获取资源失败时触发的事件。

适用于