IXRComboBox (Windows Embedded CE 6.0)

1/6/2010

This class represents a selection control that combines a non-editable text box and a popup that contains a list box that lets users select an item from a list.

Syntax

class IXRComboBox : public IXRSelector

Methods

Method Description

IXRComboBox::AddDropDownOpenedHandler

Attaches a delegate to the DropDownOpened event for this combo box. When the combo box raises the DropDownOpened event, this delegate will be invoked.

IXRComboBox::AddDropDownClosedHandler

Attaches a delegate to the DropDownClosed event for this combo box. When the combo box raises the DropDownClosed event, this delegate will be invoked.

IXRComboBox::GetIsDropDownOpen

Retrieves a value that indicates whether the popup part of this combo box is currently open.

IXRComboBox::GetIsEditable

Retrieves a value that indicates whether the user can edit text in the text-box part of this combo box. This method always returns false.

IXRComboBox::GetIsSelectionBoxHighlighted

Retrieves a value that indicates whether the item displayed in the selection box is highlighted.

IXRComboBox::GetItemContainerStyle

Retrieves the style that is used when Silverlight for Windows Embedded renders the item containers.

IXRComboBox::GetMaxDropDownHeight

Retrieves the maximum height of the popup that lists combo-box items.

IXRComboBox::GetSelectionBoxItem

Retrieves the item displayed in the selection box.

IXRComboBox::RemovedDropDownOpenedHandler

Removes a delegate to the DropDownOpened event for this combo box. When the combo box raises the DropDownOpened event, this delegate will be invoked.

IXRComboBox::RemoveDropDownClosedHandler

Removes a delegate to the DropDownClosed event for this combo box. When the combo box raises the DropDownClosed event, this delegate will be invoked.

IXRComboBox::SetIsDropDownOpen

Sets a value that indicates whether the popup part of the combo box is currently open.

IXRComboBox::SetItemContainerStyle

Sets the style that is used when Silverlight renders the item containers.

IXRComboBox::SetMaxDropDownHeight

Sets the maximum height of the popup that lists combo-box items.

Remarks

The text box that belongs to this combo box either displays the current selection or is empty if there is no selected item.

IXRComboBox contains a collection of items. The items are visible in a drop-down menu that is displayed as a popup when it is opened. IXRComboBox inherits from IXRItemsControl, and you can retrieve its IXRItemCollection object by calling IXRItemsControl::GetItems. The items collection stores each object that represents a selectable item displayed in the list. Items in this collection can be IXRComboBoxItem objects.

The method IXRComboBox::SetItemContainerStyle enables you to define a visual appearance for the items in this combo box by supplying an IXRStyle object.

The attached properties ScrollViewer.HorizontalScrollBarVisibility and ScrollViewer.VerticalScrollBarVisibility are used to indicate whether a vertical or horizontal scrollbar should be displayed so that the user can scroll the list in the popup. This is ideal if only some items in the popup are visible in the graphical window and you want to provide a scrollbar. To add scrolling properties, you can add a property setter for one of these attached properties to the IXRStyle object that you supply in the call to SetItemContainerStyle. Or, you can call the inherited method IXRDependencyObject::SetAttachedProperty(const WCHAR*, int).

If you are not using a control template for this combo box, you can retrieve the item that is currently displayed in the non-editable text box by calling the inherited method IXRSelector::GetSelectedItem, and you can set the item to display in this text box by calling IXRSelector::SetSelectedItem.

You can also define a combo box in Microsoft Silverlight 2 XAML. For information about the differences between XAML in Silverlight for Windows Embedded and Silverlight 2, see Differences Between Silverlight for the Web and Silverlight for Windows Embedded. For more information about how to define this element in the source XAML for your application, see this Microsoft Web site.

Inheritance Hierarchy

IXRDependencyObject

    IXRUIElement

        IXRFrameworkElement

            IXRControl

                IXRItemsControl

                    IXRSelector

                        IXRComboBox

.NET Framework Equivalent

System.Windows.Controls.ComboBox

Requirements

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

See Also

Reference

Classes for UI Element Management

Other Resources