Class
ComboBox

Wraps a ComboBox element.

Definition

Namespace:ArtOfTest.WebAii.Silverlight.UI

Assembly:ArtOfTest.WebAii.dll

Syntax:

cs-api-definition
public class ComboBox : Selector, IAutomationPeer, IPeerConverter, IControl, IComboBox, ISelector, IFrameworkElement, ITargetElement

Inheritance: objectAutomationObject<FrameworkElement>FrameworkElementSilverlightTestElementControlItemsControlSelectorComboBox

Implements: IAutomationPeerIComboBoxIControlIFrameworkElementIPeerConverterISelectorITargetElement

Inherited Members Selector.SelectedIndexPropertySelector.SelectedValuePathPropertySelector.IsSynchronizedWithCurrentItemPropertySelector.SelectedIndexSelector.SelectedValuePathSelector.IsSynchronizedWithCurrentItemItemsControl.DisplayMemberPathPropertyItemsControl.DisplayMemberPathControl.IsTabStopPropertyControl.TabIndexPropertyControl.TabNavigationPropertyControl.PaddingPropertyControl.HorizontalContentAlignmentPropertyControl.VerticalContentAlignmentPropertyControl.BackgroundPropertyControl.BorderBrushPropertyControl.BorderThicknessPropertyControl.FontSizePropertyControl.ForegroundPropertyControl.IsEnabledPropertyControl.FontFamilyPropertyControl.FontStretchPropertyControl.FontStylePropertyControl.FontWeightPropertyControl.IsTabStopControl.TabIndexControl.TabNavigationControl.PaddingControl.HorizontalContentAlignmentControl.VerticalContentAlignmentControl.BackgroundControl.BorderBrushControl.BorderThicknessControl.FontSizeControl.ForegroundControl.IsEnabledControl.FontFamilyControl.FontStretchControl.FontStyleControl.FontWeightSilverlightTestElement.UseLayoutRoundingPropertySilverlightTestElement.UseLayoutRoundingFrameworkElement.ActualWidthPropertyFrameworkElement.ActualHeightPropertyFrameworkElement.WidthPropertyFrameworkElement.HeightPropertyFrameworkElement.MinWidthPropertyFrameworkElement.MaxWidthPropertyFrameworkElement.MinHeightPropertyFrameworkElement.MaxHeightPropertyFrameworkElement.HorizontalAlignmentPropertyFrameworkElement.VerticalAlignmentPropertyFrameworkElement.MarginPropertyFrameworkElement.DesiredSizePropertyFrameworkElement.RenderSizePropertyFrameworkElement.NamePropertyFrameworkElement.TagPropertyFrameworkElement.DataContextPropertyFrameworkElement.OpacityPropertyFrameworkElement.ClipPropertyFrameworkElement.RenderTransformPropertyFrameworkElement.OpacityMaskPropertyFrameworkElement.RenderTransformOriginPropertyFrameworkElement.IsHitTestVisiblePropertyFrameworkElement.VisibilityPropertyFrameworkElement.GetIdentifier(out string, out string)FrameworkElement.IsChild(FrameworkElement)FrameworkElement.GetChildTagIndex(FrameworkElement)FrameworkElement.InitializeMappings(MappingsCollection)FrameworkElement.As<T>()FrameworkElement.CastAs<T>()FrameworkElement.SetProxy(bool)FrameworkElement.SetUid(string)FrameworkElement.SetFindInfo(VisualFindInfo)FrameworkElement.SetXamlTag(string)FrameworkElement.KeyPress(Keys, int, int, int)FrameworkElement.GetRectangle()FrameworkElement.GetRectangle(FrameworkElement)FrameworkElement.GetIntRectangle()FrameworkElement.IsHitTest()FrameworkElement.IsHitTest(bool)FrameworkElement.IsHitTest(FrameworkElement, bool)FrameworkElement.Highlight()FrameworkElement.Highlight(bool)FrameworkElement.Parent()FrameworkElement.Parent<T>()FrameworkElement.Parent(string)FrameworkElement.Parent(string, bool)FrameworkElement.GetNextSibling()FrameworkElement.GetPrevSibling()FrameworkElement.NextSibling(string)FrameworkElement.NextSibling<T>()FrameworkElement.PreviousSibling(string)FrameworkElement.PreviousSibling<T>()FrameworkElement.AnySibling<T>()FrameworkElement.AnySibling(string)FrameworkElement.GetScreenRectangle()FrameworkElement.ScrollToVisible()FrameworkElement.ScrollToVisible(ScrollToVisibleType)FrameworkElement.EnsureClickable()FrameworkElement.ToXml()FrameworkElement.Refresh()FrameworkElement.Equals(object)FrameworkElement.GetHashCode()FrameworkElement.GetProperties()FrameworkElement.GetAttachedProperty<T>(string, string)FrameworkElement.SetAttachedProperty<T>(string, string, T)FrameworkElement.SetFocus()FrameworkElement.ValidateMouseLocationIfNeeded(Point)FrameworkElement.GetStringPresentation()FrameworkElement.ToRealObject()FrameworkElement.FromRealObject(object)FrameworkElement.ValidateType(Type, string)FrameworkElement.GetKnownControlTypes(TechnologyType)FrameworkElement.RegisterElement(Type, string)FrameworkElement.InitKnownWpfControlTypes()FrameworkElement.InitKnownSilverlightControlTypes()FrameworkElement.InitKnownXamlControlTypes(Type)FrameworkElement.GetControlTypeFromInterface(Type)FrameworkElement.Match(IFindExpression)FrameworkElement.SetDepth(int)FrameworkElement.AddChildNode(ITargetElement)FrameworkElement.SetClosingTag(ITargetElement)FrameworkElement.GetChildren()FrameworkElement.GetParent()FrameworkElement.GetHostParent()FrameworkElement.SetParent(ITargetElement)FrameworkElement.GetUniqueHashCode()FrameworkElement.ToString()FrameworkElement.Capture()FrameworkElement.CaptureImage()FrameworkElement.GetProperty<T>(string)FrameworkElement.GetPropertyTypeSafe(string)FrameworkElement.GetAutomationProperty(string)FrameworkElement.SetProperty(string, object)FrameworkElement.ActualWidthFrameworkElement.ActualHeightFrameworkElement.WidthFrameworkElement.HeightFrameworkElement.MinWidthFrameworkElement.MaxWidthFrameworkElement.MinHeightFrameworkElement.MaxHeightFrameworkElement.HorizontalAlignmentFrameworkElement.VerticalAlignmentFrameworkElement.MarginFrameworkElement.DesiredSizeFrameworkElement.RenderSizeFrameworkElement.NameFrameworkElement.OpacityFrameworkElement.ClipFrameworkElement.RenderTransformFrameworkElement.OpacityMaskFrameworkElement.RenderTransformOriginFrameworkElement.IsHitTestVisibleFrameworkElement.VisibilityFrameworkElement.UidFrameworkElement.MappingsFrameworkElement.AutomationIdFrameworkElement.XamlTagBaseFrameworkElement.TextFrameworkElement.TextBlockContentFrameworkElement.TextLiteralContentFrameworkElement.UserFrameworkElement.XamlTagFrameworkElement.WaitFrameworkElement.FindFrameworkElement.ApplicationFrameworkElement.AbsoluteTagIndexFrameworkElement.TagNameIndexFrameworkElement.AbsoluteSiblingTagIndexFrameworkElement.EnableValidateMouseLocationFrameworkElement.ToolTipTextFrameworkElement.ComputedVisibilityFrameworkElement.IsVisibleFrameworkElement.ChildrenFrameworkElement.TechnologyTypeFrameworkElement.DepthFrameworkElement.IsTestRegionFrameworkElement.ParsedElementFrameworkElement.HostAutomationObject<FrameworkElement>.GetProperty(AutomationProperty)AutomationObject<FrameworkElement>.GetProperty(AutomationProperty, object)AutomationObject<FrameworkElement>.SetProperty(AutomationProperty, object)AutomationObject<FrameworkElement>.InvokeMethod(AutomationMethod, params object[])AutomationObject<FrameworkElement>.InvokeMethod(string, params object[])AutomationObject<FrameworkElement>.Serialize()AutomationObject<FrameworkElement>.Deserialize(string)AutomationObject<FrameworkElement>.ReferenceAutomationObject<FrameworkElement>.PropertyBag

Constructors

ComboBox()

Declaration

cs-api-definition
public ComboBox()

Fields

IsDropDownOpenProperty

Declaration

cs-api-definition
public static AutomationProperty IsDropDownOpenProperty

Field Value

AutomationProperty

MaxDropDownHeightProperty

Declaration

cs-api-definition
public static AutomationProperty MaxDropDownHeightProperty

Field Value

AutomationProperty

Properties

IsDropDownOpen

Get/set whether the drop down is open.

Declaration

cs-api-definition
public bool IsDropDownOpen { get; set; }

Property Value

bool

Implements IComboBox.IsDropDownOpen

Items

Retrieves the list of items for this ComboBoxItem's for this ComboBox.

Declaration

cs-api-definition
public IList<ComboBoxItem> Items { get; }

Property Value

IList<ComboBoxItem>

ItemsPopup

Get the popup containing the list with combo box items. Override for custom control template.

Declaration

cs-api-definition
public virtual FrameworkElement ItemsPopup { get; }

Property Value

FrameworkElement

Implements IComboBox.ItemsPopup

MaxDropDownHeight

Declaration

cs-api-definition
public double MaxDropDownHeight { get; set; }

Property Value

double

Methods

AssignReference(AutomationReference)

Assign the automation reference to this element.

Declaration

cs-api-definition
public override void AssignReference(AutomationReference reference)

Parameters

reference

AutomationReference

The automation reference to assign.

Overrides FrameworkElement.AssignReference(AutomationReference)

Implements IFrameworkElement.AssignReference(AutomationReference)

GetRealType()

Gets the real object type. This property returns string.empty on FrameworkElement and all subclasses that inherit from it.

Declaration

cs-api-definition
public override string GetRealType()

Returns

string

Overrides Selector.GetRealType()

OpenDropDown(bool)

Open the combobox drop down popup.

Declaration

cs-api-definition
public void OpenDropDown(bool simulateRealUser)

Parameters

simulateRealUser

bool

Whether to simulate real user click action or just change the drop down state via automation property.

Implements IComboBox.OpenDropDown(bool)

SelectItemByIndex(bool, int)

Select a combobox item by given index.

Declaration

cs-api-definition
public void SelectItemByIndex(bool simulateRealUser, int index)

Parameters

simulateRealUser

bool

Whether to simulate selection by real user click or just change the selected index.

index

int

The index of the item to select.

Implements IComboBox.SelectItemByIndex(bool, int)

SelectItemByIndex(bool, int, bool)

Select a combobox item by given index.

Declaration

cs-api-definition
public void SelectItemByIndex(bool simulateRealUser, int index, bool openDropDownBeforeSelection)

Parameters

simulateRealUser

bool

Whether to simulate selection by real user click or just change the selected index.

index

int

The index of the item to select.

openDropDownBeforeSelection

bool

Whether to automatically open the dropdown.

Implements IComboBox.SelectItemByIndex(bool, int, bool)

SelectItemByText(bool, string)

Select a combo box item by given text.

Declaration

cs-api-definition
public void SelectItemByText(bool simulateRealUser, string text)

Parameters

simulateRealUser

bool

Whether to simulate selection by real user click or just change the selected state of the item.

text

string

The text of the item to select.

Implements IComboBox.SelectItemByText(bool, string)

SelectItemByText(bool, string, bool)

Select a combo box item by given text.

Declaration

cs-api-definition
public void SelectItemByText(bool simulateRealUser, string text, bool openDropDownBeforeSelection)

Parameters

simulateRealUser

bool

Whether to simulate selection by real user click or just change the selected state of the item.

text

string

The text of the item to select.

openDropDownBeforeSelection

bool

Whether to automatically open the dropdown.

Implements IComboBox.SelectItemByText(bool, string, bool)