IXRDependencyObject::SetName (Compact 2013)

3/28/2014

This method sets the name of this dependency object.

Syntax

virtual HRESULT STDMETHODCALLTYPE SetName(
    __in const WCHAR* pName
) = 0;

Parameters

  • pName
    [in] Pointer to a string that contains the new name of this dependency object.

Return Value

Returns an HRESULT that indicates success or failure.

Remarks

The name provides a reference so that C++ code-behind, such as event handler code, can refer to an element in the element tree.

The IXRFrameworkElement::FindName method can find objects by **Name****in the element tree.

.NET Framework Equivalent

System.Windows.FrameworkElement.Name

Requirements

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

IXRDependencyObject
IXRDependencyObject::GetName