Class LookupTextBox
The Lookup textbox is a usercontrol for selecting and validating data from an custom source. All sources must be inherit from IValueSelectionProver, such as the ItemBoxSelectionProvider.
Implements
Namespace: Simplic.Framework.DBUI
Assembly: Simplic.Framework.DBUI.dll
Syntax
public sealed class LookupTextBox : LookupTextBoxBase
  Constructors
| Improve this Doc View SourceLookupTextBox()
Create a new lookup textbox and all its components.
Declaration
public LookupTextBox()
  Fields
| Improve this Doc View SourceCurrentTenantProperty
Declaration
public static readonly DependencyProperty CurrentTenantProperty
  Field Value
| Type | Description | 
|---|---|
| DependencyProperty | 
EditButtonVisibillityProperty
Declaration
public static readonly DependencyProperty EditButtonVisibillityProperty
  Field Value
| Type | Description | 
|---|---|
| DependencyProperty | 
EditCommandParameterProperty
Declaration
public static readonly DependencyProperty EditCommandParameterProperty
  Field Value
| Type | Description | 
|---|---|
| DependencyProperty | 
EditCommandProperty
Declaration
public static readonly DependencyProperty EditCommandProperty
  Field Value
| Type | Description | 
|---|---|
| DependencyProperty | 
IdentityProperty
Dependency property which represents the identity of the current LookupTextbox. If the property is set, the find method will be called and the system try to resolve it
Declaration
public static readonly DependencyProperty IdentityProperty
  Field Value
| Type | Description | 
|---|---|
| DependencyProperty | 
IsReadOnlyProperty
Dependency property which represents the IsReadOnly-Flag of the current LookupTextbox. If the property is set, textboxes and buttons will be readonly too
Declaration
public static readonly DependencyProperty IsReadOnlyProperty
  Field Value
| Type | Description | 
|---|---|
| DependencyProperty | 
MergedIsTabStopProperty
Dependency property which represents the MergedIsTabStopProperty-Flag of the current LookupTextbox. If the property is set, textboxes and buttons will be included in tab navigation.
Declaration
public static readonly DependencyProperty MergedIsTabStopProperty
  Field Value
| Type | Description | 
|---|---|
| DependencyProperty | 
ParameterProperty
Dependency property for parameter
Declaration
public static readonly DependencyProperty ParameterProperty
  Field Value
| Type | Description | 
|---|---|
| DependencyProperty | 
SelectionProviderProperty
Dependency to set / bind value selection provider
Declaration
public static readonly DependencyProperty SelectionProviderProperty
  Field Value
| Type | Description | 
|---|---|
| DependencyProperty | 
ShowIdentityTextBoxPropertiy
Declaration
public static readonly DependencyProperty ShowIdentityTextBoxPropertiy
  Field Value
| Type | Description | 
|---|---|
| DependencyProperty | 
VerticalAlignIdentityTextBoxProperty
Declaration
public static readonly DependencyProperty VerticalAlignIdentityTextBoxProperty
  Field Value
| Type | Description | 
|---|---|
| DependencyProperty | 
Properties
| Improve this Doc View SourceCurrentTenant
Gets or sets the current tenant
Declaration
public Guid? CurrentTenant { get; set; }
  Property Value
| Type | Description | 
|---|---|
| System.Nullable<Guid> | 
EditButtonVisibillity
Gets or sets the Visibillity for the Edit Button
Declaration
public Visibility EditButtonVisibillity { get; set; }
  Property Value
| Type | Description | 
|---|---|
| Visibility | 
EditCommand
Gets or sets the EditCommand for the Edit Button
Declaration
public ICommand EditCommand { get; set; }
  Property Value
| Type | Description | 
|---|---|
| ICommand | 
EditCommandParameter
Gets or sets the parameter for the Edit Button
Declaration
public object EditCommandParameter { get; set; }
  Property Value
| Type | Description | 
|---|---|
| System.Object | 
ErrorBorderBrush
Defines if the scond textbox should be shown or not (Identity-TextBox)
Declaration
public Brush ErrorBorderBrush { get; set; }
  Property Value
| Type | Description | 
|---|---|
| Brush | 
Identity
Identity property, call on property changed when used
Declaration
public object Identity { get; set; }
  Property Value
| Type | Description | 
|---|---|
| System.Object | 
IsReadOnly
IsReadOnly property for making things readable but not changeable
Declaration
public bool IsReadOnly { get; set; }
  Property Value
| Type | Description | 
|---|---|
| System.Boolean | 
MergedIsTabStop
Gets or sets a value that indicates whether a control is included in tab navigation.
Declaration
public bool? MergedIsTabStop { get; set; }
  Property Value
| Type | Description | 
|---|---|
| System.Nullable<System.Boolean> | 
Parameter
Gets or sets a list of parameter that can be used within a selection provider
Declaration
public IDictionary<string, object> Parameter { get; set; }
  Property Value
| Type | Description | 
|---|---|
| IDictionary<System.String, System.Object> | 
Provider
Get the current registered provider
Declaration
public IValueSelectionProvider Provider { get; }
  Property Value
| Type | Description | 
|---|---|
| IValueSelectionProvider | 
Result
Current result object
Declaration
public SelectorLookupResult Result { get; }
  Property Value
| Type | Description | 
|---|---|
| SelectorLookupResult | 
SelectButtonVisibility
Gets or sets the select button visibility
Declaration
public Visibility SelectButtonVisibility { get; set; }
  Property Value
| Type | Description | 
|---|---|
| Visibility | 
SelectionProvider
Gets or set the current Value-Selection-Provider
Declaration
public IValueSelectionProvider SelectionProvider { get; set; }
  Property Value
| Type | Description | 
|---|---|
| IValueSelectionProvider | 
ShowIdentityTextBox
Gets/sets the flag if the resultTextBox is shown
Declaration
public bool ShowIdentityTextBox { get; set; }
  Property Value
| Type | Description | 
|---|---|
| System.Boolean | 
ShowValueSelectorKey
Set the key on which the selection provider should open and select a value
Declaration
public Key ShowValueSelectorKey { get; set; }
  Property Value
| Type | Description | 
|---|---|
| Key | 
VerticalAlignIdentityTextBox
Gets/sets the flag if the resultTextBox is shown in an second row
Declaration
public bool VerticalAlignIdentityTextBox { get; set; }
  Property Value
| Type | Description | 
|---|---|
| System.Boolean | 
Methods
| Improve this Doc View SourceDispose()
Didpose the current provider
Declaration
public void Dispose()
  FocusInputBox()
Focus the input-textbox of this control
Declaration
public void FocusInputBox()
  Initialize(IValueSelectionProvider)
Initialize a new selection provider. This must only done on setting up a new window
Declaration
public void Initialize(IValueSelectionProvider provider)
  Parameters
| Type | Name | Description | 
|---|---|---|
| IValueSelectionProvider | provider | Instance of a selection provider  | 
      
OnGotFocus(RoutedEventArgs)
Got focus redirect to textbox
Declaration
protected override void OnGotFocus(RoutedEventArgs e)
  Parameters
| Type | Name | Description | 
|---|---|---|
| RoutedEventArgs | e | 
OnGotKeyboardFocus(KeyboardFocusChangedEventArgs)
Got focus redirect to textbox
Declaration
protected override void OnGotKeyboardFocus(KeyboardFocusChangedEventArgs e)
  Parameters
| Type | Name | Description | 
|---|---|---|
| KeyboardFocusChangedEventArgs | e | 
SelectionProviderShow()
opens the slection dialog
Declaration
public void SelectionProviderShow()
  SetDependentLookupTextBox(LookupTextBox, Object[])
Make this LookupTextBox depending of another lookup textbox result
Declaration
public void SetDependentLookupTextBox(LookupTextBox dependentTextBox, params object[] parameter)
  Parameters
| Type | Name | Description | 
|---|---|---|
| LookupTextBox | dependentTextBox | Instance of a lookup textbox  | 
      
| System.Object[] | parameter | Parameter which will be passed to the Lookup-Interface  | 
      
SetFocus()
Gives the lookuptextbox the focus
Declaration
public void SetFocus()
  SetOnAddItem(LookupTextBox.AddItem)
Set the delegate which will be called, if an item should be added
Declaration
public void SetOnAddItem(LookupTextBox.AddItem onAddItemDelegate)
  Parameters
| Type | Name | Description | 
|---|---|---|
| LookupTextBox.AddItem | onAddItemDelegate | Pointer to the add function  | 
      
SetValidationResult(SelectorLookupResult, Boolean)
Set validated valies on the ui
Declaration
public void SetValidationResult(SelectorLookupResult result, bool setIdentityProperty = true)
  Parameters
| Type | Name | Description | 
|---|---|---|
| SelectorLookupResult | result | Object containing all information for setting the validation result  | 
      
| System.Boolean | setIdentityProperty | Defines whether to set the identity property and bind  | 
      
Events
| Improve this Doc View SourceBeforeBoxOpen
Declaration
public event LookupTextBox.BeforeBoxOpenDelegate BeforeBoxOpen
  Event Type
| Type | Description | 
|---|---|
| LookupTextBox.BeforeBoxOpenDelegate | 
SelectionChanged
Will be called if the selection changed
Declaration
public event LookupTextBox.SelectionChangedHandler SelectionChanged
  Event Type
| Type | Description | 
|---|---|
| LookupTextBox.SelectionChangedHandler |