Class
ComboBox

Represents the Wpf ComboBox control wrapper.

Definition

Namespace:ArtOfTest.WebAii.Controls.Xaml.Wpf

Assembly:ArtOfTest.WebAii.dll

Syntax:

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

Inheritance: objectAutomationObject<FrameworkElement>FrameworkElementWpfTestElementControlItemsControlSelectorComboBox

Implements: IAutomationPeerIComboBoxIControlIFrameworkElementIPeerConverterISelectorITargetElement

Inherited Members Selector.IsSynchronizedWithCurrentItemPropertySelector.SelectedIndexPropertySelector.SelectedValuePathPropertySelector.IsSynchronizedWithCurrentItemSelector.SelectedIndexSelector.SelectedValuePathItemsControl.HasItemsPropertyItemsControl.DisplayMemberPathPropertyItemsControl.ItemStringFormatPropertyItemsControl.ItemBindingGroupPropertyItemsControl.IsGroupingPropertyItemsControl.AlternationCountPropertyItemsControl.IsTextSearchEnabledPropertyItemsControl.HasItemsItemsControl.DisplayMemberPathItemsControl.ItemStringFormatItemsControl.ItemBindingGroupItemsControl.IsGroupingItemsControl.AlternationCountItemsControl.IsTextSearchEnabledControl.BorderBrushPropertyControl.BorderThicknessPropertyControl.BackgroundPropertyControl.ForegroundPropertyControl.FontSizePropertyControl.HorizontalContentAlignmentPropertyControl.VerticalContentAlignmentPropertyControl.TabIndexPropertyControl.IsTabStopPropertyControl.PaddingPropertyControl.FontFamilyPropertyControl.FontStretchPropertyControl.FontStylePropertyControl.FontWeightPropertyControl.BorderBrushControl.BorderThicknessControl.BackgroundControl.ForegroundControl.FontSizeControl.HorizontalContentAlignmentControl.VerticalContentAlignmentControl.TabIndexControl.IsTabStopControl.PaddingControl.FontFamilyControl.FontStretchControl.FontStyleControl.FontWeightWpfTestElement.OverridesDefaultStylePropertyWpfTestElement.BindingGroupPropertyWpfTestElement.InputScopePropertyWpfTestElement.LayoutTransformPropertyWpfTestElement.FlowDirectionPropertyWpfTestElement.ForceCursorPropertyWpfTestElement.ContextMenuPropertyWpfTestElement.IsMouseDirectlyOverPropertyWpfTestElement.IsMouseOverPropertyWpfTestElement.IsStylusOverPropertyWpfTestElement.IsKeyboardFocusWithinPropertyWpfTestElement.IsMouseCapturedPropertyWpfTestElement.IsMouseCaptureWithinPropertyWpfTestElement.IsStylusDirectlyOverPropertyWpfTestElement.IsStylusCapturedPropertyWpfTestElement.IsStylusCaptureWithinPropertyWpfTestElement.IsKeyboardFocusedPropertyWpfTestElement.AllowDropPropertyWpfTestElement.ClipToBoundsPropertyWpfTestElement.SnapsToDevicePixelsPropertyWpfTestElement.IsFocusedPropertyWpfTestElement.IsEnabledPropertyWpfTestElement.IsVisiblePropertyWpfTestElement.FocusablePropertyWpfTestElement.OverridesDefaultStyleWpfTestElement.BindingGroupWpfTestElement.InputScopeWpfTestElement.FlowDirectionWpfTestElement.ForceCursorWpfTestElement.ContextMenuWpfTestElement.IsMouseDirectlyOverWpfTestElement.IsMouseOverWpfTestElement.IsStylusOverWpfTestElement.IsKeyboardFocusWithinWpfTestElement.IsMouseCapturedWpfTestElement.IsMouseCaptureWithinWpfTestElement.IsStylusDirectlyOverWpfTestElement.IsStylusCapturedWpfTestElement.IsStylusCaptureWithinWpfTestElement.IsKeyboardFocusedWpfTestElement.AllowDropWpfTestElement.ClipToBoundsWpfTestElement.SnapsToDevicePixelsWpfTestElement.IsFocusedWpfTestElement.IsEnabledWpfTestElement.IsVisibleWpfTestElement.FocusableWpfTestElement.ComputedVisibilityFrameworkElement.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.TextBlockContentFrameworkElement.TextLiteralContentFrameworkElement.UserFrameworkElement.XamlTagFrameworkElement.WaitFrameworkElement.FindFrameworkElement.ApplicationFrameworkElement.AbsoluteTagIndexFrameworkElement.TagNameIndexFrameworkElement.AbsoluteSiblingTagIndexFrameworkElement.EnableValidateMouseLocationFrameworkElement.ToolTipTextFrameworkElement.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

IsEditableProperty

Declaration

cs-api-definition
public static AutomationProperty IsEditableProperty

Field Value

AutomationProperty

IsReadOnlyProperty

Declaration

cs-api-definition
public static AutomationProperty IsReadOnlyProperty

Field Value

AutomationProperty

MaxDropDownHeightProperty

Declaration

cs-api-definition
public static AutomationProperty MaxDropDownHeightProperty

Field Value

AutomationProperty

SelectionBoxItemStringFormatProperty

Declaration

cs-api-definition
public static AutomationProperty SelectionBoxItemStringFormatProperty

Field Value

AutomationProperty

StaysOpenOnEditProperty

Declaration

cs-api-definition
public static AutomationProperty StaysOpenOnEditProperty

Field Value

AutomationProperty

TextProperty

Declaration

cs-api-definition
public static AutomationProperty TextProperty

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

IsEditable

Declaration

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

Property Value

bool

IsReadOnly

Declaration

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

Property Value

bool

Items

Get the list of combobox items.

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

SelectionBoxItemStringFormat

Declaration

cs-api-definition
public string SelectionBoxItemStringFormat { get; set; }

Property Value

string

StaysOpenOnEdit

Declaration

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

Property Value

bool

Text

Gets the first text block text.

Declaration

cs-api-definition
public string Text { get; set; }

Property Value

string

Implements IFrameworkElement.Text

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)