FrameworkContentElement.SetResourceReference 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
搜索具有指定名称的资源,并为指定属性设置资源引用。
public:
void SetResourceReference(System::Windows::DependencyProperty ^ dp, System::Object ^ name);
public void SetResourceReference(System.Windows.DependencyProperty dp, object name);
member this.SetResourceReference : System.Windows.DependencyProperty * obj -> unit
Public Sub SetResourceReference (dp As DependencyProperty, name As Object)
参数
资源绑定到的属性。
- name
- Object
资源的名称。
注解
资源引用类似于在 标记中使用 DynamicResource 标记扩展 。 资源引用将创建一个内部表达式,用于在运行时延迟提供指定属性的值。 每当资源字典通过内部事件或当前元素重新父级时(父更改将更改字典查找路径)时,将重新计算表达式。