Share via


IXRDependencyObject::GetName (Windows Embedded CE 6.0)

1/6/2010

This method retrieves the name of this dependency object.

Syntax

virtual HRESULT STDMETHODCALLTYPE GetName(
    BSTR* pName
) = 0;

Parameters

  • pName
    [out] Pointer to a string that contains the name of the 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 a XAML element after Silverlight parses the XAML and generates the element tree.

You can use this property to obtain the value set in x:Name in the source XAML, which was parsed to compose the element tree, or in a prior call to IXRDependencyObject::SetName. 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
Windows Embedded CE Windows Embedded CE 6.0 R3

See Also

Reference

IXRDependencyObject
IXRDependencyObject::SetName