Share via


IXRSelector::GetSelectedItem (Windows Embedded CE 6.0)

1/6/2010

This method retrieves the selected item in the list.

Syntax

virtual HRESULT STDMETHODCALLTYPE GetSelectedItem(
    IXRDependencyObject **ppValue
) = 0;

Parameters

  • ppValue
    [out] Pointer to an IXRDependencyObject pointer that indicates the selected item in the list.

Return Value

Returns an HRESULT that indicates success or failure.

Remarks

The IXRDependencyObject derived object pointed to by ppValue can be an IXRListBoxItem object or an IXRComboBoxItem object. The collection of items for this selector object can be retrieved by calling the inherited method IXRItemsControl::GetItems.

The combo box, which inherits from IXRSelector, does not allow more than one item to be selected at a time.

You can use IXRSelector::GetSelectedIndex or IXRSelector::GetSelectedItem to retrieve the selected item from application code.

To use a specific interface pointer type, you can use the helper template version of this method that Silverlight for Windows Embedded provides. When you supply a derived type, this version automatically supplies a type-safe method that implicitly converts the returned type from a generic interface so you do not have to explicitly call QueryInterface to convert the generic interface into the required object type. For more information, see Type-Safety in Silverlight for Windows Embedded.

.NET Framework Equivalent

System.Windows.Controls.Primitives.Selector.SelectedItem

Requirements

Header XamlRuntime.h
sysgen SYSGEN_XAML_RUNTIME
Windows Embedded CE Windows Embedded CE 6.0 R3

See Also

Reference

IXRSelector
IXRSelector::SetSelectedItem