语言

ResourceDictionary.Insert(Object, Object) 方法

定义

向 ResourceDictionary 添加新条目。

public:
 virtual bool Insert(Platform::Object ^ key, Platform::Object ^ value) = IMap<Platform::Object ^, Platform::Object ^>::Insert;
bool Insert(IInspectable const& key, IInspectable const& value);
public bool Insert(object key, object value);
function insert(key, value)
Public Function Insert (key As Object, value As Object) As Boolean

参数

key
Object

Platform::Object

IInspectable

要插入的资源的对象键。

value
Object

Platform::Object

IInspectable

要插入的资源的对象值。

返回

Boolean

bool

如果调用该方法替换了键已存在的值,则为 true;如果调用方法定义了新键,则为 false。

实现

注解

注释

等效Microsoft .NET API 为 Add。

适用于

另请参阅