Classes
AddedRemovedEvent
AlertElement
AnchorContainerElement
ArrowShape
ButtonElement
CanvasElement
CanvasManager
CheckboxElement
CheckboxSkinElement
CollectionChangedEvent
CollectionSort
ColorPickerButtonElement
ColorPickerElement
ContainerBaseElement
CursorDefinition
DataGridColumnDefinition
DataGridDataRenderer
DataGridElement
DataGridHeaderColumnDividerSkinElement
DataGridHeaderElement
DataGridHeaderItemRenderer
DataGridItemData
DataGridItemRendererBase
DataGridLabelItemRenderer
DataListData
DataListElement
DataRendererBaseElement
DataRendererLabelElement
DatePickerButtonElement
DatePickerElement
DispatcherEvent
DrawMetrics
DropdownArrowButtonSkinElement
DropdownBaseElement
DropdownElement
ElementEvent
ElementGridItemClickEvent
ElementKeyboardEvent
ElementListItemClickEvent
ElementMouseEvent
ElementMouseWheelEvent
EllipseShape
EventDispatcher
FillBase
GridContainerElement
GridContainerRowColumnDefinition
ImageElement
IpInputElement
LabelElement
LinearGradientFill
ListCollection
ListContainerElement
ProgressElement
RadioButtonElement
RadioButtonSkinElement
RoundedRectangleShape
ScrollBarElement
ScrollButtonSkinElement
ShapeBase
SkinnableElement
SolidFill
StyleableBase
StyleChangedEvent
StyleData
StyleDefinition
StyleProxy
TextAreaElement
TextElement
TextFieldElement
TextInputElement
TimeInputElement
ToggleButtonElement
ToggleButtonGroup
Tween
ViewportElement


DropdownElement

DropdownElement is a compound button that creates a pop-up drop-down list which the user
can select a value which is then displayed by the Dropdown. The values
in the list are generated by a supplied ListCollection and associated styling.
The Dropdown button itself contains a child button which is used to render
the divider line and arrow. Dropdown proxies its SkinState style to the arrow
button so the arrow button will change states along with the Dropdown itself.
See the default item renderer, DataRendererLabelElement and the default
skin for the arrow button, DropdownArrowButtonSkinElement for additional styles.

Inheritance:     DropdownElement ➞ DropdownBaseElementButtonElementSkinnableElementCanvasElementStyleableBaseStyleDefinitionEventDispatcher ➞ Object

Styles
Show Inherited
Style Defined By
ItemLabelFunction     :    Function DropdownElement
A function that returns a text string per a supplied collection item.
function (itemData) { return "" }
 
MaxPopupHeight     :    Number DropdownElement
Maximum height in pixels of the pop up list element.
 
PopupDataListClipTopOrBottom     :    Number DropdownElement
Size in pixels to clip off the pop up list. Clips top when opening down, bottom when opening up.
Defaults to 1 to collapse pop up list and dropdown default borders.
 
PopupDataListStyle     :    StyleDefinition DropdownElement
The StyleDefinition or [StyleDefinition] array to apply to the pop up list element.
 


Events
Show Inherited
Event Defined By
changed     :    ElementEvent DropdownElement
Dispatched when the drop down selection changes as a result of user input.
 
listitemclick     :    ElementListItemClickEvent DropdownElement
Dispatched when a DataRenderer in the popup list is clicked. Includes associated collection item/index.
 


Public Functions
Show Inherited
Function Defined By
DropdownElement() [Constructor] DropdownElement
Creates new DropdownElement instance.
 
getSelectedIndex() DropdownElement
Gets the selected collection index.
  returns     :    int
Selected collection index or -1 if none selected.
 
getSelectedItem() DropdownElement
Gets the selected collection item.
  returns     :    Object
Selected collection item or null if none selected.
 
setListCollection(listCollection) DropdownElement
Sets the ListCollection to be used as the data-provider.
  listCollection     :    ListCollection
ListCollection to be used as the data-provider.
 
setSelectedIndex(index) DropdownElement
Sets the selection collection index. Also updates selected item.
  index     :    int
Collection index to select.
 
setSelectedItem(item) DropdownElement
Sets the collection item to select, also updates selected index.
  item     :    Object
Collection item to select.
 


Internal Members
Show Inherited


Internal Functions
Show Inherited
Function Defined By
_onDropdownDataListPopupChanged(elementEvent) DropdownElement
Event handler for pop up list "changed" event. Updates selected item/index and re-dispatches "changed" event.
  elementEvent     :    ElementEvent
ElementEvent to process.
 
_onDropdownDataListPopupLayoutComplete(event) DropdownElement
Event handler for pop up list "layoutcomplete".
Updates the pop up list height after content size is known and determines
if drop down opens up or down depending on available space.
  event     :    DispatcherEvent
DispatcherEvent to process.
 
_onDropdownDataListPopupListItemClicked(elementListItemClickEvent) DropdownElement
Event handler for pop up list "listitemclick" event.
Re-dispatches the list event and closes the Dropdown.
  elementListItemClickEvent     :    ElementListItemClickEvent
ElementListItemClickEvent to process.
 
_onDropdownListCollectionChanged(collectionChangedEvent) DropdownElement
Event handler for the ListCollection data-providers "collectionchanged" event.
  collectionChangedEvent     :    CollectionChangedEvent
CollectionChangedEvent to process.
 
_sampleTextWidths() DropdownElement
Measures text width of first 10 ListCollection items for measurement.
  returns     :    Number
Largest text width in pixels.