Intersoft ClientUI Documentation
UXDataComboBox Class
Members  See Also  Send Feedback
Intersoft.Client.UI.Data Namespace : UXDataComboBox Class






Represents a queryable combo box control.

Object Model

UXDataComboBox Class

Syntax

Visual Basic (Declaration) 
<TemplatePartAttribute(Name="NoResultTextElement", Type=System.Windows.Controls.Grid)>
<TemplatePartAttribute(Name="NoResultTemplateElement", Type=System.Windows.Controls.Grid)>
<TemplatePartAttribute(Name="NoResultElement", Type=System.Windows.Controls.Grid)>
<TemplatePartAttribute(Name="DropDownTemplateContainer", Type=System.Windows.Controls.Grid)>
<TemplateVisualStateAttribute(Name="MouseOver", GroupName="CommonStates")>
<TemplateVisualStateAttribute(GroupName="CommonStates", Name="Normal")>
<TemplatePartAttribute(Name="ItemsPresenter", Type=System.Windows.Controls.ItemsPresenter)>
<TemplatePartAttribute(Name="EditableElement", Type=System.Windows.Controls.Grid)>
<TemplatePartAttribute(Name="NonEditableElement", Type=System.Windows.Controls.Grid)>
<TemplatePartAttribute(Name="HeadersPresenter", Type=System.Windows.Controls.Grid)>
<TemplatePartAttribute(Name="InputElement", Type=Intersoft.Client.UI.Controls.UXTextBox)>
<TemplatePartAttribute(Name="BusyTextElement", Type=System.Windows.Controls.Grid)>
<TemplatePartAttribute(Name="BusyTemplateElement", Type=System.Windows.Controls.Grid)>
<TemplatePartAttribute(Name="DropDownButton", Type=Intersoft.Client.UI.Aqua.UXToggleButton)>
<TemplateVisualStateAttribute(GroupName="CommonStates", Name="Pressed")>
<TemplateVisualStateAttribute(GroupName="StatusBarStates", Name="StatusBarCollapsed")>
<TemplateVisualStateAttribute(GroupName="StatusBarStates", Name="StatusBarVisible")>
<TemplateVisualStateAttribute(GroupName="DescriptionContainerStates", Name="DescriptionContainerCollapsed")>
<TemplatePartAttribute(Name="DescriptionTextElement", Type=System.Windows.Controls.TextBlock)>
<TemplatePartAttribute(Name="MoreButtonElement", Type=System.Windows.Controls.Primitives.ButtonBase)>
<TemplatePartAttribute(Name="ClearButtonElement", Type=System.Windows.Controls.Primitives.ButtonBase)>
<TemplatePartAttribute(Name="StatusElement", Type=System.Windows.Controls.Grid)>
<TemplatePartAttribute(Name="RootElement", Type=System.Windows.Controls.Grid)>
<TemplatePartAttribute(Name="PopupElement", Type=Intersoft.Client.UI.Controls.UXPopup)>
<TemplatePartAttribute(Name="BusyElement", Type=System.Windows.Controls.Grid)>
<TemplatePartAttribute(Name="KeyboardFocus", Type=System.Windows.Shapes.Rectangle)>
<TemplateVisualStateAttribute(GroupName="DescriptionContainerStates", Name="DescriptionContainerVisible")>
<TemplatePartAttribute(Name="DisabledVisualElement", Type=System.Windows.Controls.Border)>
<TemplatePartAttribute(Name="FocusVisualElement", Type=System.Windows.Controls.Border)>
<TemplateVisualStateAttribute(GroupName="KeyboardFocusStates", Name="KeyboardFocused")>
<TemplateVisualStateAttribute(GroupName="KeyboardFocusStates", Name="KeyboardUnfocused")>
<TemplateVisualStateAttribute(GroupName="ValidationStates", Name="Valid")>
<TemplateVisualStateAttribute(GroupName="FocusStates", Name="Unfocused")>
<TemplateVisualStateAttribute(GroupName="CommonStates", Name="Disabled")>
<TemplateVisualStateAttribute(GroupName="CommonStates", Name="HighlightFocused")>
<TemplateVisualStateAttribute(GroupName="FocusStates", Name="Focused")>
<StyleTypedPropertyAttribute(Property="ScrollViewerStyle", StyleTargetType=Intersoft.Client.UI.Controls.UXScrollViewer)>
<StyleTypedPropertyAttribute(Property="ItemContainerStyle", StyleTargetType=Intersoft.Client.UI.Aqua.UXCollection.UXSearchBoxItem)>
<DescriptionAttribute("Represents a queryable combo box control.")>
<TemplateVisualStateAttribute(GroupName="ValidationStates", Name="InvalidUnfocused")>
<TemplateVisualStateAttribute(GroupName="ValidationStates", Name="InvalidFocused")>
<TemplatePartAttribute(Name="ItemsContainer", Type=System.Windows.Controls.Grid)>
Public Class UXDataComboBox 
   Inherits Intersoft.Client.UI.Aqua.UXCollection.UXComboBox
   Implements IControlIFramework, ILicensing, IFocusRedirectionIKeyboardFocusISelection 
Visual Basic (Usage)Copy Code
Dim instance As UXDataComboBox
C# 
[TemplatePartAttribute(Name="NoResultTextElement", Type=System.Windows.Controls.Grid)]
[TemplatePartAttribute(Name="NoResultTemplateElement", Type=System.Windows.Controls.Grid)]
[TemplatePartAttribute(Name="NoResultElement", Type=System.Windows.Controls.Grid)]
[TemplatePartAttribute(Name="DropDownTemplateContainer", Type=System.Windows.Controls.Grid)]
[TemplateVisualStateAttribute(Name="MouseOver", GroupName="CommonStates")]
[TemplateVisualStateAttribute(GroupName="CommonStates", Name="Normal")]
[TemplatePartAttribute(Name="ItemsPresenter", Type=System.Windows.Controls.ItemsPresenter)]
[TemplatePartAttribute(Name="EditableElement", Type=System.Windows.Controls.Grid)]
[TemplatePartAttribute(Name="NonEditableElement", Type=System.Windows.Controls.Grid)]
[TemplatePartAttribute(Name="HeadersPresenter", Type=System.Windows.Controls.Grid)]
[TemplatePartAttribute(Name="InputElement", Type=Intersoft.Client.UI.Controls.UXTextBox)]
[TemplatePartAttribute(Name="BusyTextElement", Type=System.Windows.Controls.Grid)]
[TemplatePartAttribute(Name="BusyTemplateElement", Type=System.Windows.Controls.Grid)]
[TemplatePartAttribute(Name="DropDownButton", Type=Intersoft.Client.UI.Aqua.UXToggleButton)]
[TemplateVisualStateAttribute(GroupName="CommonStates", Name="Pressed")]
[TemplateVisualStateAttribute(GroupName="StatusBarStates", Name="StatusBarCollapsed")]
[TemplateVisualStateAttribute(GroupName="StatusBarStates", Name="StatusBarVisible")]
[TemplateVisualStateAttribute(GroupName="DescriptionContainerStates", Name="DescriptionContainerCollapsed")]
[TemplatePartAttribute(Name="DescriptionTextElement", Type=System.Windows.Controls.TextBlock)]
[TemplatePartAttribute(Name="MoreButtonElement", Type=System.Windows.Controls.Primitives.ButtonBase)]
[TemplatePartAttribute(Name="ClearButtonElement", Type=System.Windows.Controls.Primitives.ButtonBase)]
[TemplatePartAttribute(Name="StatusElement", Type=System.Windows.Controls.Grid)]
[TemplatePartAttribute(Name="RootElement", Type=System.Windows.Controls.Grid)]
[TemplatePartAttribute(Name="PopupElement", Type=Intersoft.Client.UI.Controls.UXPopup)]
[TemplatePartAttribute(Name="BusyElement", Type=System.Windows.Controls.Grid)]
[TemplatePartAttribute(Name="KeyboardFocus", Type=System.Windows.Shapes.Rectangle)]
[TemplateVisualStateAttribute(GroupName="DescriptionContainerStates", Name="DescriptionContainerVisible")]
[TemplatePartAttribute(Name="DisabledVisualElement", Type=System.Windows.Controls.Border)]
[TemplatePartAttribute(Name="FocusVisualElement", Type=System.Windows.Controls.Border)]
[TemplateVisualStateAttribute(GroupName="KeyboardFocusStates", Name="KeyboardFocused")]
[TemplateVisualStateAttribute(GroupName="KeyboardFocusStates", Name="KeyboardUnfocused")]
[TemplateVisualStateAttribute(GroupName="ValidationStates", Name="Valid")]
[TemplateVisualStateAttribute(GroupName="FocusStates", Name="Unfocused")]
[TemplateVisualStateAttribute(GroupName="CommonStates", Name="Disabled")]
[TemplateVisualStateAttribute(GroupName="CommonStates", Name="HighlightFocused")]
[TemplateVisualStateAttribute(GroupName="FocusStates", Name="Focused")]
[StyleTypedPropertyAttribute(Property="ScrollViewerStyle", StyleTargetType=Intersoft.Client.UI.Controls.UXScrollViewer)]
[StyleTypedPropertyAttribute(Property="ItemContainerStyle", StyleTargetType=Intersoft.Client.UI.Aqua.UXCollection.UXSearchBoxItem)]
[DescriptionAttribute("Represents a queryable combo box control.")]
[TemplateVisualStateAttribute(GroupName="ValidationStates", Name="InvalidUnfocused")]
[TemplateVisualStateAttribute(GroupName="ValidationStates", Name="InvalidFocused")]
[TemplatePartAttribute(Name="ItemsContainer", Type=System.Windows.Controls.Grid)]
public class UXDataComboBox : Intersoft.Client.UI.Aqua.UXCollection.UXComboBox, IControlIFramework, ILicensing, IFocusRedirectionIKeyboardFocusISelection  
JScript 
TemplatePartAttribute(Name="NoResultTextElement", Type=System.Windows.Controls.Grid)
TemplatePartAttribute(Name="NoResultTemplateElement", Type=System.Windows.Controls.Grid)
TemplatePartAttribute(Name="NoResultElement", Type=System.Windows.Controls.Grid)
TemplatePartAttribute(Name="DropDownTemplateContainer", Type=System.Windows.Controls.Grid)
TemplateVisualStateAttribute(Name="MouseOver", GroupName="CommonStates")
TemplateVisualStateAttribute(GroupName="CommonStates", Name="Normal")
TemplatePartAttribute(Name="ItemsPresenter", Type=System.Windows.Controls.ItemsPresenter)
TemplatePartAttribute(Name="EditableElement", Type=System.Windows.Controls.Grid)
TemplatePartAttribute(Name="NonEditableElement", Type=System.Windows.Controls.Grid)
TemplatePartAttribute(Name="HeadersPresenter", Type=System.Windows.Controls.Grid)
TemplatePartAttribute(Name="InputElement", Type=Intersoft.Client.UI.Controls.UXTextBox)
TemplatePartAttribute(Name="BusyTextElement", Type=System.Windows.Controls.Grid)
TemplatePartAttribute(Name="BusyTemplateElement", Type=System.Windows.Controls.Grid)
TemplatePartAttribute(Name="DropDownButton", Type=Intersoft.Client.UI.Aqua.UXToggleButton)
TemplateVisualStateAttribute(GroupName="CommonStates", Name="Pressed")
TemplateVisualStateAttribute(GroupName="StatusBarStates", Name="StatusBarCollapsed")
TemplateVisualStateAttribute(GroupName="StatusBarStates", Name="StatusBarVisible")
TemplateVisualStateAttribute(GroupName="DescriptionContainerStates", Name="DescriptionContainerCollapsed")
TemplatePartAttribute(Name="DescriptionTextElement", Type=System.Windows.Controls.TextBlock)
TemplatePartAttribute(Name="MoreButtonElement", Type=System.Windows.Controls.Primitives.ButtonBase)
TemplatePartAttribute(Name="ClearButtonElement", Type=System.Windows.Controls.Primitives.ButtonBase)
TemplatePartAttribute(Name="StatusElement", Type=System.Windows.Controls.Grid)
TemplatePartAttribute(Name="RootElement", Type=System.Windows.Controls.Grid)
TemplatePartAttribute(Name="PopupElement", Type=Intersoft.Client.UI.Controls.UXPopup)
TemplatePartAttribute(Name="BusyElement", Type=System.Windows.Controls.Grid)
TemplatePartAttribute(Name="KeyboardFocus", Type=System.Windows.Shapes.Rectangle)
TemplateVisualStateAttribute(GroupName="DescriptionContainerStates", Name="DescriptionContainerVisible")
TemplatePartAttribute(Name="DisabledVisualElement", Type=System.Windows.Controls.Border)
TemplatePartAttribute(Name="FocusVisualElement", Type=System.Windows.Controls.Border)
TemplateVisualStateAttribute(GroupName="KeyboardFocusStates", Name="KeyboardFocused")
TemplateVisualStateAttribute(GroupName="KeyboardFocusStates", Name="KeyboardUnfocused")
TemplateVisualStateAttribute(GroupName="ValidationStates", Name="Valid")
TemplateVisualStateAttribute(GroupName="FocusStates", Name="Unfocused")
TemplateVisualStateAttribute(GroupName="CommonStates", Name="Disabled")
TemplateVisualStateAttribute(GroupName="CommonStates", Name="HighlightFocused")
TemplateVisualStateAttribute(GroupName="FocusStates", Name="Focused")
StyleTypedPropertyAttribute(Property="ScrollViewerStyle", StyleTargetType=Intersoft.Client.UI.Controls.UXScrollViewer)
StyleTypedPropertyAttribute(Property="ItemContainerStyle", StyleTargetType=Intersoft.Client.UI.Aqua.UXCollection.UXSearchBoxItem)
DescriptionAttribute("Represents a queryable combo box control.")
TemplateVisualStateAttribute(GroupName="ValidationStates", Name="InvalidUnfocused")
TemplateVisualStateAttribute(GroupName="ValidationStates", Name="InvalidFocused")
TemplatePartAttribute(Name="ItemsContainer", Type=System.Windows.Controls.Grid)
public class UXDataComboBox extends Intersoft.Client.UI.Aqua.UXCollection.UXComboBox implements IControlIFramework, ILicensing, IFocusRedirectionIKeyboardFocusISelection 
Managed Extensions for C++ 
[TemplatePartAttribute(Name="NoResultTextElement", Type=System.Windows.Controls.Grid)]
[TemplatePartAttribute(Name="NoResultTemplateElement", Type=System.Windows.Controls.Grid)]
[TemplatePartAttribute(Name="NoResultElement", Type=System.Windows.Controls.Grid)]
[TemplatePartAttribute(Name="DropDownTemplateContainer", Type=System.Windows.Controls.Grid)]
[TemplateVisualStateAttribute(Name="MouseOver", GroupName="CommonStates")]
[TemplateVisualStateAttribute(GroupName="CommonStates", Name="Normal")]
[TemplatePartAttribute(Name="ItemsPresenter", Type=System.Windows.Controls.ItemsPresenter)]
[TemplatePartAttribute(Name="EditableElement", Type=System.Windows.Controls.Grid)]
[TemplatePartAttribute(Name="NonEditableElement", Type=System.Windows.Controls.Grid)]
[TemplatePartAttribute(Name="HeadersPresenter", Type=System.Windows.Controls.Grid)]
[TemplatePartAttribute(Name="InputElement", Type=Intersoft.Client.UI.Controls.UXTextBox)]
[TemplatePartAttribute(Name="BusyTextElement", Type=System.Windows.Controls.Grid)]
[TemplatePartAttribute(Name="BusyTemplateElement", Type=System.Windows.Controls.Grid)]
[TemplatePartAttribute(Name="DropDownButton", Type=Intersoft.Client.UI.Aqua.UXToggleButton)]
[TemplateVisualStateAttribute(GroupName="CommonStates", Name="Pressed")]
[TemplateVisualStateAttribute(GroupName="StatusBarStates", Name="StatusBarCollapsed")]
[TemplateVisualStateAttribute(GroupName="StatusBarStates", Name="StatusBarVisible")]
[TemplateVisualStateAttribute(GroupName="DescriptionContainerStates", Name="DescriptionContainerCollapsed")]
[TemplatePartAttribute(Name="DescriptionTextElement", Type=System.Windows.Controls.TextBlock)]
[TemplatePartAttribute(Name="MoreButtonElement", Type=System.Windows.Controls.Primitives.ButtonBase)]
[TemplatePartAttribute(Name="ClearButtonElement", Type=System.Windows.Controls.Primitives.ButtonBase)]
[TemplatePartAttribute(Name="StatusElement", Type=System.Windows.Controls.Grid)]
[TemplatePartAttribute(Name="RootElement", Type=System.Windows.Controls.Grid)]
[TemplatePartAttribute(Name="PopupElement", Type=Intersoft.Client.UI.Controls.UXPopup)]
[TemplatePartAttribute(Name="BusyElement", Type=System.Windows.Controls.Grid)]
[TemplatePartAttribute(Name="KeyboardFocus", Type=System.Windows.Shapes.Rectangle)]
[TemplateVisualStateAttribute(GroupName="DescriptionContainerStates", Name="DescriptionContainerVisible")]
[TemplatePartAttribute(Name="DisabledVisualElement", Type=System.Windows.Controls.Border)]
[TemplatePartAttribute(Name="FocusVisualElement", Type=System.Windows.Controls.Border)]
[TemplateVisualStateAttribute(GroupName="KeyboardFocusStates", Name="KeyboardFocused")]
[TemplateVisualStateAttribute(GroupName="KeyboardFocusStates", Name="KeyboardUnfocused")]
[TemplateVisualStateAttribute(GroupName="ValidationStates", Name="Valid")]
[TemplateVisualStateAttribute(GroupName="FocusStates", Name="Unfocused")]
[TemplateVisualStateAttribute(GroupName="CommonStates", Name="Disabled")]
[TemplateVisualStateAttribute(GroupName="CommonStates", Name="HighlightFocused")]
[TemplateVisualStateAttribute(GroupName="FocusStates", Name="Focused")]
[StyleTypedPropertyAttribute(Property="ScrollViewerStyle", StyleTargetType=Intersoft.Client.UI.Controls.UXScrollViewer)]
[StyleTypedPropertyAttribute(Property="ItemContainerStyle", StyleTargetType=Intersoft.Client.UI.Aqua.UXCollection.UXSearchBoxItem)]
[DescriptionAttribute("Represents a queryable combo box control.")]
[TemplateVisualStateAttribute(GroupName="ValidationStates", Name="InvalidUnfocused")]
[TemplateVisualStateAttribute(GroupName="ValidationStates", Name="InvalidFocused")]
[TemplatePartAttribute(Name="ItemsContainer", Type=System.Windows.Controls.Grid)]
public __gc class UXDataComboBox : public Intersoft.Client.UI.Aqua.UXCollection.UXComboBox, IControlIFramework, ILicensing, IFocusRedirectionIKeyboardFocusISelection  
C++/CLI 
[TemplatePartAttribute(Name="NoResultTextElement", Type=System.Windows.Controls.Grid)]
[TemplatePartAttribute(Name="NoResultTemplateElement", Type=System.Windows.Controls.Grid)]
[TemplatePartAttribute(Name="NoResultElement", Type=System.Windows.Controls.Grid)]
[TemplatePartAttribute(Name="DropDownTemplateContainer", Type=System.Windows.Controls.Grid)]
[TemplateVisualStateAttribute(Name="MouseOver", GroupName="CommonStates")]
[TemplateVisualStateAttribute(GroupName="CommonStates", Name="Normal")]
[TemplatePartAttribute(Name="ItemsPresenter", Type=System.Windows.Controls.ItemsPresenter)]
[TemplatePartAttribute(Name="EditableElement", Type=System.Windows.Controls.Grid)]
[TemplatePartAttribute(Name="NonEditableElement", Type=System.Windows.Controls.Grid)]
[TemplatePartAttribute(Name="HeadersPresenter", Type=System.Windows.Controls.Grid)]
[TemplatePartAttribute(Name="InputElement", Type=Intersoft.Client.UI.Controls.UXTextBox)]
[TemplatePartAttribute(Name="BusyTextElement", Type=System.Windows.Controls.Grid)]
[TemplatePartAttribute(Name="BusyTemplateElement", Type=System.Windows.Controls.Grid)]
[TemplatePartAttribute(Name="DropDownButton", Type=Intersoft.Client.UI.Aqua.UXToggleButton)]
[TemplateVisualStateAttribute(GroupName="CommonStates", Name="Pressed")]
[TemplateVisualStateAttribute(GroupName="StatusBarStates", Name="StatusBarCollapsed")]
[TemplateVisualStateAttribute(GroupName="StatusBarStates", Name="StatusBarVisible")]
[TemplateVisualStateAttribute(GroupName="DescriptionContainerStates", Name="DescriptionContainerCollapsed")]
[TemplatePartAttribute(Name="DescriptionTextElement", Type=System.Windows.Controls.TextBlock)]
[TemplatePartAttribute(Name="MoreButtonElement", Type=System.Windows.Controls.Primitives.ButtonBase)]
[TemplatePartAttribute(Name="ClearButtonElement", Type=System.Windows.Controls.Primitives.ButtonBase)]
[TemplatePartAttribute(Name="StatusElement", Type=System.Windows.Controls.Grid)]
[TemplatePartAttribute(Name="RootElement", Type=System.Windows.Controls.Grid)]
[TemplatePartAttribute(Name="PopupElement", Type=Intersoft.Client.UI.Controls.UXPopup)]
[TemplatePartAttribute(Name="BusyElement", Type=System.Windows.Controls.Grid)]
[TemplatePartAttribute(Name="KeyboardFocus", Type=System.Windows.Shapes.Rectangle)]
[TemplateVisualStateAttribute(GroupName="DescriptionContainerStates", Name="DescriptionContainerVisible")]
[TemplatePartAttribute(Name="DisabledVisualElement", Type=System.Windows.Controls.Border)]
[TemplatePartAttribute(Name="FocusVisualElement", Type=System.Windows.Controls.Border)]
[TemplateVisualStateAttribute(GroupName="KeyboardFocusStates", Name="KeyboardFocused")]
[TemplateVisualStateAttribute(GroupName="KeyboardFocusStates", Name="KeyboardUnfocused")]
[TemplateVisualStateAttribute(GroupName="ValidationStates", Name="Valid")]
[TemplateVisualStateAttribute(GroupName="FocusStates", Name="Unfocused")]
[TemplateVisualStateAttribute(GroupName="CommonStates", Name="Disabled")]
[TemplateVisualStateAttribute(GroupName="CommonStates", Name="HighlightFocused")]
[TemplateVisualStateAttribute(GroupName="FocusStates", Name="Focused")]
[StyleTypedPropertyAttribute(Property="ScrollViewerStyle", StyleTargetType=Intersoft.Client.UI.Controls.UXScrollViewer)]
[StyleTypedPropertyAttribute(Property="ItemContainerStyle", StyleTargetType=Intersoft.Client.UI.Aqua.UXCollection.UXSearchBoxItem)]
[DescriptionAttribute("Represents a queryable combo box control.")]
[TemplateVisualStateAttribute(GroupName="ValidationStates", Name="InvalidUnfocused")]
[TemplateVisualStateAttribute(GroupName="ValidationStates", Name="InvalidFocused")]
[TemplatePartAttribute(Name="ItemsContainer", Type=System.Windows.Controls.Grid)]
public ref class UXDataComboBox : public Intersoft.Client.UI.Aqua.UXCollection.UXComboBox, IControlIFramework, ILicensing, IFocusRedirectionIKeyboardFocusISelection  

Example

The following code shows how to use UXDataComboBox to query and select a record.

View Copy Code
<Intersoft:UXDataComboBox x:Name="SampleControl1" DisplayMemberPath="FirstName" Width="150"
            SelectedValue="{Binding LeaveRequest.EmployeeID, Mode=TwoWay}" SelectedValuePath="EmployeeID" 
            SearchResult="{Binding Employees}" 
            FilterDescriptors="{Binding LookUpDescriptor.FilterDescriptors, Mode=TwoWay}"
            BusyMode="Always" AutoShowResultBox="True" IsTextSearchEnabled="True" ToolTipService.ToolTip="Try to type in 'a', 'r', or 's' character..."/>
ViewMoel Copy Code
using System;
using System.Collections;
using Intersoft.Client.Data.ComponentModel;
using Intersoft.ClientUI.Samples.DataControls.ModelServices;

namespace Intersoft.ClientUI.Samples.DataControls.ViewModels
{
    public class DataComboBoxViewModel : ViewModelBase
    {
        #region Constructors

        public DataComboBoxViewModel()            
        {          
            if (!this.IsInDesignMode)
            {                
                this.EmployeesSource = EmployeesRepository.Instance;                
                this.Presenter = new MessagePresenter();
                this.LookUpDescriptor = new QueryDescriptor();         
            }            
        }

        #endregion

        #region Fields

        private IEnumerable _employees;
        private QueryDescriptor _lookUpDescriptor;

        #endregion

        #region Properties

        public IEnumerable Employees
        {
            get { return this._employees; }
            set
            {
                if (_employees != value)
                {
                    _employees = value;
                    OnPropertyChanged("Employees");
                }
            }
        }

        protected IDataRepository EmployeesSource { get; set; }

        protected bool IsInDesignMode
        {
            get
            {
                return Intersoft.Client.Framework.ISControl.IsInDesignModeStatic;
            }
        }

        
        public QueryDescriptor LookUpDescriptor
        {
            get
            {
                return _lookUpDescriptor;
            }
            set
            {
                if (_lookUpDescriptor != value)
                {
                    if (_lookUpDescriptor != null)
                        _lookUpDescriptor.QueryChanged -= new EventHandler(OnLookUpQueryChanged);

                    _lookUpDescriptor = value;
                    _lookUpDescriptor.QueryChanged += new EventHandler(OnLookUpQueryChanged);

                    OnPropertyChanged("LookUpDescriptor");
                }
            }
        }

        protected virtual MessagePresenter Presenter { get; private set; }

        #endregion

        #region Methods

        private void OnLookUpQueryChanged(object sender, EventArgs e)
        {
            this.EmployeesSource.GetData
            (
                this.LookUpDescriptor,
                (employees) =>
                {
                    this.Employees = employees;
                },
                (totalItemCount) =>
                {
                },
                (error) =>
                {
                    this.Presenter.ShowErrorMessage(
                        "An exception has occurred during data loading\n." +
                        "Message: " + error.Message +
                        "Stack Trace: " + error.StackTrace);
                }
            );
        }

        #endregion
    }
}

Notice that you only need to bind the FilterDescriptors in your XAML and handle the QueryChanged in your ViewModel. The UXDataComboBox will pass the filter descriptors based on FilterMemberPath, FilterOperator and user's input query.

If the FilterMemberPath property is not specified, UXDataComboBox will use DisplayMemberPath for the filtering purpose.

Remarks

UXDataComboBox is used to query and select a record from relatively large data set. Unlike UXComboBox, UXDataComboBox does not have a collection of items bound initially. You need to input the query to UXDataComboBox and handle the query using the QueryDescriptor and MVVM pattern. To learn more about the QueryDescriptor, see Query Descriptor Overview. For more information about MVVM pattern, see MVVM Pattern Overview.

To learn more about UXDataComboBox see UXDataComboBox Overview.

Inheritance Hierarchy

System.Object
   System.Windows.DependencyObject
      System.Windows.UIElement
         System.Windows.FrameworkElement
            System.Windows.Controls.Control
               System.Windows.Controls.ItemsControl
                  Intersoft.Client.Framework.ISItemsControl
                     Intersoft.Client.Framework.ISSelectionControl
                        Intersoft.Client.UI.Aqua.UXCollection.UXComboBox
                           Intersoft.Client.UI.Data.UXDataComboBox
                              Intersoft.Client.UI.Data.UXDataLookupBox
                              Intersoft.Client.UI.Data.UXMultipleSelectionComboBox
                              Intersoft.Client.UI.Data.UXPageableComboBox

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2012 All Rights Reserved.