Class LocatorBox
A composite locator editor.
public class LocatorBox : UserControl, INotifyPropertyChanged, IDataContextProvider, ILogical, IThemeVariantHost, IResourceHost, IResourceNode, IStyleHost, ISetLogicalParent, ISetInheritanceParent, ISupportInitialize, INamed, IInputElement, IDataTemplateHost, ISetterValue
- Inheritance
-
AvaloniaObjectAnimatableStyledElementVisualLayoutableInteractiveInputElementControlTemplatedControlContentControlUserControlLocatorBox
- Implements
-
IDataContextProviderILogicalIThemeVariantHostIResourceHostIResourceNodeIStyleHostISetLogicalParentISetInheritanceParentINamedIInputElementIDataTemplateHostISetterValue
- Inherited Members
-
UserControl.OnCreateAutomationPeer()ContentControl.ContentPropertyContentControl.ContentTemplatePropertyContentControl.HorizontalContentAlignmentPropertyContentControl.VerticalContentAlignmentPropertyContentControl.OnPropertyChanged(AvaloniaPropertyChangedEventArgs)ContentControl.RegisterContentPresenter(ContentPresenter)ContentControl.ContentContentControl.ContentTemplateContentControl.PresenterContentControl.HorizontalContentAlignmentContentControl.VerticalContentAlignmentTemplatedControl.BackgroundPropertyTemplatedControl.BackgroundSizingPropertyTemplatedControl.BorderBrushPropertyTemplatedControl.BorderThicknessPropertyTemplatedControl.CornerRadiusPropertyTemplatedControl.FontFamilyPropertyTemplatedControl.FontFeaturesPropertyTemplatedControl.FontSizePropertyTemplatedControl.FontStylePropertyTemplatedControl.FontWeightPropertyTemplatedControl.FontStretchPropertyTemplatedControl.ForegroundPropertyTemplatedControl.LetterSpacingPropertyTemplatedControl.PaddingPropertyTemplatedControl.TemplatePropertyTemplatedControl.IsTemplateFocusTargetPropertyTemplatedControl.TemplateAppliedEventTemplatedControl.GetIsTemplateFocusTarget(Control)TemplatedControl.ApplyTemplate()TemplatedControl.GetTemplateFocusTarget()TemplatedControl.OnAttachedToLogicalTree(LogicalTreeAttachmentEventArgs)TemplatedControl.OnDetachedFromLogicalTree(LogicalTreeAttachmentEventArgs)TemplatedControl.OnApplyTemplate(TemplateAppliedEventArgs)TemplatedControl.OnTemplateChanged(AvaloniaPropertyChangedEventArgs)TemplatedControl.BackgroundTemplatedControl.BackgroundSizingTemplatedControl.BorderBrushTemplatedControl.BorderThicknessTemplatedControl.CornerRadiusTemplatedControl.FontFamilyTemplatedControl.FontFeaturesTemplatedControl.FontSizeTemplatedControl.FontStyleTemplatedControl.FontWeightTemplatedControl.FontStretchTemplatedControl.ForegroundTemplatedControl.LetterSpacingTemplatedControl.PaddingTemplatedControl.TemplateTemplatedControl.TemplateAppliedControl.FocusAdornerPropertyControl.TagPropertyControl.ContextMenuPropertyControl.ContextFlyoutPropertyControl.RequestBringIntoViewEventControl.LoadedEventControl.UnloadedEventControl.SizeChangedEventControl.OnLoaded(RoutedEventArgs)Control.OnUnloaded(RoutedEventArgs)Control.OnSizeChanged(SizeChangedEventArgs)Control.OnAttachedToVisualTreeCore(VisualTreeAttachmentEventArgs)Control.OnDetachedFromVisualTreeCore(VisualTreeAttachmentEventArgs)Control.OnGotFocus(FocusChangedEventArgs)Control.OnLostFocus(FocusChangedEventArgs)Control.OnPointerReleased(PointerReleasedEventArgs)Control.OnKeyUp(KeyEventArgs)Control.FocusAdornerControl.DataTemplatesControl.ContextMenuControl.ContextFlyoutControl.IsLoadedControl.TagControl.LoadedControl.UnloadedControl.SizeChangedInputElement.FocusablePropertyInputElement.IsEnabledPropertyInputElement.IsEffectivelyEnabledPropertyInputElement.CursorPropertyInputElement.IsKeyboardFocusWithinPropertyInputElement.IsFocusedPropertyInputElement.IsHitTestVisiblePropertyInputElement.IsPointerOverPropertyInputElement.IsTabStopPropertyInputElement.GotFocusEventInputElement.GettingFocusEventInputElement.LostFocusEventInputElement.LosingFocusEventInputElement.KeyDownEventInputElement.KeyUpEventInputElement.TabIndexPropertyInputElement.TextInputEventInputElement.TextInputMethodClientRequestedEventInputElement.PointerEnteredEventInputElement.PointerExitedEventInputElement.PointerMovedEventInputElement.PointerPressedEventInputElement.PointerReleasedEventInputElement.PointerCaptureLostEventInputElement.PointerWheelChangedEventInputElement.ContextRequestedEventInputElement.ContextCanceledEventInputElement.IsHoldingEnabledPropertyInputElement.IsHoldWithMouseEnabledPropertyInputElement.PinchEventInputElement.PinchEndedEventInputElement.PullGestureEventInputElement.PullGestureEndedEventInputElement.SwipeGestureEventInputElement.SwipeGestureEndedEventInputElement.ScrollGestureEventInputElement.ScrollGestureInertiaStartingEventInputElement.ScrollGestureEndedEventInputElement.PointerTouchPadGestureMagnifyEventInputElement.PointerTouchPadGestureRotateEventInputElement.PointerTouchPadGestureSwipeEventInputElement.TappedEventInputElement.RightTappedEventInputElement.HoldingEventInputElement.DoubleTappedEventInputElement.Focus(NavigationMethod, KeyModifiers)InputElement.OnAccessKey(RoutedEventArgs)InputElement.OnGettingFocus(FocusChangingEventArgs)InputElement.OnLosingFocus(FocusChangingEventArgs)InputElement.OnKeyDown(KeyEventArgs)InputElement.OnTextInput(TextInputEventArgs)InputElement.OnPointerEntered(PointerEventArgs)InputElement.OnPointerExited(PointerEventArgs)InputElement.OnPointerMoved(PointerEventArgs)InputElement.OnPointerPressed(PointerPressedEventArgs)InputElement.GetNextTabStopOverride()InputElement.GetPreviousTabStopOverride()InputElement.GetFirstFocusableElementOverride()InputElement.GetLastFocusableElementOverride()InputElement.OnPointerCaptureLost(PointerCaptureLostEventArgs)InputElement.OnPointerWheelChanged(PointerWheelEventArgs)InputElement.OnTapped(TappedEventArgs)InputElement.OnRightTapped(TappedEventArgs)InputElement.OnDoubleTapped(TappedEventArgs)InputElement.OnHolding(HoldingRoutedEventArgs)InputElement.UpdateIsEffectivelyEnabled()InputElement.GetIsHoldingEnabled(StyledElement)InputElement.GetIsHoldWithMouseEnabled(StyledElement)InputElement.FocusableInputElement.IsEnabledInputElement.CursorInputElement.IsKeyboardFocusWithinInputElement.IsFocusedInputElement.IsHitTestVisibleInputElement.IsPointerOverInputElement.IsTabStopInputElement.IsEffectivelyEnabledInputElement.TabIndexInputElement.KeyBindingsInputElement.IsEnabledCoreInputElement.GestureRecognizersInputElement.GotFocusInputElement.GettingFocusInputElement.LostFocusInputElement.LosingFocusInputElement.KeyDownInputElement.KeyUpInputElement.TextInputInputElement.TextInputMethodClientRequestedInputElement.PointerEnteredInputElement.PointerExitedInputElement.PointerMovedInputElement.PointerPressedInputElement.PointerReleasedInputElement.PointerCaptureLostInputElement.PointerWheelChangedInputElement.ContextRequestedInputElement.ContextCanceledInputElement.PinchInputElement.PinchEndedInputElement.PullGestureInputElement.PullGestureEndedInputElement.ScrollGestureInputElement.ScrollGestureInertiaStartingInputElement.ScrollGestureEndedInputElement.PointerTouchPadGestureMagnifyInputElement.PointerTouchPadGestureRotateInputElement.SwipeGestureInputElement.SwipeGestureEndedInputElement.PointerTouchPadGestureSwipeInputElement.TappedInputElement.RightTappedInputElement.HoldingInputElement.DoubleTappedInteractive.RaiseEvent(RoutedEventArgs)Interactive.BuildEventRoute(RoutedEvent)Layoutable.DesiredSizePropertyLayoutable.WidthPropertyLayoutable.HeightPropertyLayoutable.MinWidthPropertyLayoutable.MaxWidthPropertyLayoutable.MinHeightPropertyLayoutable.MaxHeightPropertyLayoutable.MarginPropertyLayoutable.HorizontalAlignmentPropertyLayoutable.VerticalAlignmentPropertyLayoutable.UseLayoutRoundingPropertyLayoutable.UpdateLayout()Layoutable.Measure(Size)Layoutable.Arrange(Rect)Layoutable.InvalidateMeasure()Layoutable.InvalidateArrange()Layoutable.AffectsMeasure<T>(params AvaloniaProperty[])Layoutable.AffectsArrange<T>(params AvaloniaProperty[])Layoutable.MeasureCore(Size)Layoutable.MeasureOverride(Size)Layoutable.ArrangeCore(Rect)Layoutable.ArrangeOverride(Size)Layoutable.OnMeasureInvalidated()Layoutable.OnVisualParentChanged(Visual, Visual)Layoutable.WidthLayoutable.HeightLayoutable.MinWidthLayoutable.MaxWidthLayoutable.MinHeightLayoutable.MaxHeightLayoutable.MarginLayoutable.HorizontalAlignmentLayoutable.VerticalAlignmentLayoutable.DesiredSizeLayoutable.IsMeasureValidLayoutable.IsArrangeValidLayoutable.UseLayoutRoundingLayoutable.EffectiveViewportChangedLayoutable.LayoutUpdatedVisual.BoundsPropertyVisual.ClipToBoundsPropertyVisual.ClipPropertyVisual.IsVisiblePropertyVisual.OpacityPropertyVisual.OpacityMaskPropertyVisual.CacheModePropertyVisual.EffectPropertyVisual.HasMirrorTransformPropertyVisual.RenderTransformPropertyVisual.RenderTransformOriginPropertyVisual.FlowDirectionPropertyVisual.VisualParentPropertyVisual.ZIndexPropertyVisual.GetFlowDirection(Visual)Visual.SetFlowDirection(Visual, FlowDirection)Visual.InvalidateVisual()Visual.Render(DrawingContext)Visual.AffectsRender<T>(params AvaloniaProperty[])Visual.OnAttachedToVisualTree(VisualTreeAttachmentEventArgs)Visual.OnDetachedFromVisualTree(VisualTreeAttachmentEventArgs)Visual.InvalidateMirrorTransform()Visual.BoundsVisual.ClipToBoundsVisual.ClipVisual.IsEffectivelyVisibleVisual.IsVisibleVisual.OpacityVisual.OpacityMaskVisual.CacheModeVisual.EffectVisual.HasMirrorTransformVisual.RenderTransformVisual.RenderTransformOriginVisual.FlowDirectionVisual.ZIndexVisual.VisualChildrenVisual.VisualRootVisual.BypassFlowDirectionPoliciesVisual.AttachedToVisualTreeVisual.DetachedFromVisualTreeStyledElement.DataContextPropertyStyledElement.NamePropertyStyledElement.ParentPropertyStyledElement.TemplatedParentPropertyStyledElement.ThemePropertyStyledElement.BeginInit()StyledElement.EndInit()StyledElement.ApplyStyling()StyledElement.InitializeIfNeeded()StyledElement.OnDataContextBeginUpdate()StyledElement.OnDataContextEndUpdate()StyledElement.OnInitialized()StyledElement.NameStyledElement.ClassesStyledElement.DataContextStyledElement.IsInitializedStyledElement.StylesStyledElement.StyleKeyStyledElement.ResourcesStyledElement.TemplatedParentStyledElement.ThemeStyledElement.LogicalChildrenStyledElement.PseudoClassesStyledElement.StyleKeyOverrideStyledElement.ParentStyledElement.ActualThemeVariantStyledElement.AttachedToLogicalTreeStyledElement.DetachedFromLogicalTreeStyledElement.DataContextChangedStyledElement.InitializedStyledElement.ResourcesChangedStyledElement.ActualThemeVariantChangedAnimatable.TransitionsPropertyAnimatable.OnPropertyChangedCore(AvaloniaPropertyChangedEventArgs)Animatable.TransitionsAvaloniaObject.CheckAccess()AvaloniaObject.VerifyAccess()AvaloniaObject.ClearValue(AvaloniaProperty)AvaloniaObject.ClearValue<T>(AvaloniaProperty<T>)AvaloniaObject.ClearValue<T>(StyledProperty<T>)AvaloniaObject.ClearValue<T>(DirectPropertyBase<T>)AvaloniaObject.GetHashCode()AvaloniaObject.GetValue(AvaloniaProperty)AvaloniaObject.GetValue<T>(StyledProperty<T>)AvaloniaObject.GetValue<T>(DirectPropertyBase<T>)AvaloniaObject.GetBaseValue<T>(StyledProperty<T>)AvaloniaObject.IsAnimating(AvaloniaProperty)AvaloniaObject.IsSet(AvaloniaProperty)AvaloniaObject.SetValue<T>(StyledProperty<T>, T, BindingPriority)AvaloniaObject.SetValue<T>(DirectPropertyBase<T>, T)AvaloniaObject.SetCurrentValue<T>(StyledProperty<T>, T)AvaloniaObject.Bind(AvaloniaProperty, BindingBase)AvaloniaObject.CoerceValue(AvaloniaProperty)AvaloniaObject.RaisePropertyChanged<T>(DirectPropertyBase<T>, T, T)AvaloniaObject.SetAndRaise<T>(DirectPropertyBase<T>, ref T, T)AvaloniaObject.InheritanceParentAvaloniaObject.this[AvaloniaProperty]AvaloniaObject.this[IndexerDescriptor]AvaloniaObject.DispatcherAvaloniaObject.PropertyChanged
- Extension Methods
Constructors
LocatorBox()
Constructor.
public LocatorBox()
Fields
IsReadOnlyProperty
IsReadOnly property.
public static readonly StyledProperty<bool> IsReadOnlyProperty
Field Value
- StyledProperty<bool>
KeyValueProperty
KeyValue property.
public static readonly StyledProperty<object> KeyValueProperty
Field Value
- StyledProperty<object>
LocatorDefProperty
LocatorDef property.
public static readonly StyledProperty<LocatorDef> LocatorDefProperty
Field Value
- StyledProperty<LocatorDef>
fGrid
The popup result grid.
protected GroupGrid fGrid
Field Value
fLastResult
The last locator result.
protected LocatorResult fLastResult
Field Value
fMenuButton
The context menu button.
protected Button fMenuButton
Field Value
- Button
fPopup
The result popup.
protected Popup fPopup
Field Value
- Popup
fPopupBorder
The popup border.
protected Border fPopupBorder
Field Value
- Border
fRoot
The root panel.
protected Grid fRoot
Field Value
- Grid
fTextBoxMap
The display text boxes by field name.
protected Dictionary<string, TextBox> fTextBoxMap
Field Value
- Dictionary<string, TextBox>
fTextBoxes
The display text boxes.
protected List<TextBox> fTextBoxes
Field Value
- List<TextBox>
Properties
ContextRowProvider
Provides the current row context.
public IRowProvider ContextRowProvider { get; set; }
Property Value
IsReadOnly
True when this control is read-only.
public bool IsReadOnly { get; set; }
Property Value
KeyValue
The selected key value.
public object KeyValue { get; set; }
Property Value
LocatorDef
The locator definition.
public LocatorDef LocatorDef { get; set; }
Property Value
MenuButton
The reference menu button.
public Button MenuButton { get; }
Property Value
- Button
Methods
ApplyReadOnly()
Applies the read-only state to child editors.
protected virtual void ApplyReadOnly()
AssignRow(DataRow)
Assigns a selected source row.
protected virtual void AssignRow(DataRow Row)
Parameters
RowDataRow
Build()
Builds the visual tree.
protected virtual void Build()
ClearTargetBoxes()
Clears all target textboxes.
public virtual void ClearTargetBoxes()
ClosePopup()
Closes the result popup.
protected virtual void ClosePopup()
ContainsSearchTrigger(string)
Returns true when a term contains the locator search trigger.
protected virtual bool ContainsSearchTrigger(string Term)
Parameters
Termstring
Returns
CreateMenuButton()
Creates the context menu button.
protected virtual Button CreateMenuButton()
Returns
- Button
CreatePopup()
Creates the popup and result grid.
protected virtual void CreatePopup()
CreatePopupColumns(DataTable)
Creates popup grid columns.
protected virtual void CreatePopupColumns(DataTable Table)
Parameters
TableDataTable
CreateRequest(TextBox)
Creates a locator request.
protected virtual LocatorRequest CreateRequest(TextBox TextBox)
Parameters
TextBoxTextBox
Returns
CreateTextBox(string)
Creates a field text box.
protected virtual TextBox CreateTextBox(string FieldName)
Parameters
FieldNamestring
Returns
- TextBox
GetDisplayFields()
Returns the locator fields displayed by this control.
protected virtual List<string> GetDisplayFields()
Returns
GetFieldWidth(string, int, List<string>)
Returns the display width for a locator field.
protected virtual GridLength GetFieldWidth(string FieldName, int Index, List<string> Fields)
Parameters
Returns
- GridLength
GetLogSearchTerm(string)
Returns a normalized search term without the trigger.
protected virtual string GetLogSearchTerm(string Term)
Parameters
Termstring
Returns
GetPopupGridHeight(DataView)
Returns the popup grid height.
protected virtual double GetPopupGridHeight(DataView DataView)
Parameters
DataViewDataView
Returns
Grid_DoubleTapped(object, TappedEventArgs)
Handles result grid double tap.
protected virtual void Grid_DoubleTapped(object Sender, TappedEventArgs Args)
Parameters
SenderobjectArgsTappedEventArgs
Grid_KeyDown(object, KeyEventArgs)
Handles result grid key down.
protected virtual void Grid_KeyDown(object Sender, KeyEventArgs Args)
Parameters
SenderobjectArgsKeyEventArgs
Grid_PreviewKeyDown(object, KeyEventArgs)
Handles result grid preview key down.
protected virtual void Grid_PreviewKeyDown(object Sender, KeyEventArgs Args)
Parameters
SenderobjectArgsKeyEventArgs
IsSearchField(string)
Returns true when a field can be used as a search field.
protected virtual bool IsSearchField(string FieldName)
Parameters
FieldNamestring
Returns
OpenPopup(Control)
Opens the result popup.
protected virtual void OpenPopup(Control Target)
Parameters
TargetControl
Rebuild()
Rebuilds the control.
public virtual void Rebuild()
RefreshTargetBoxes(DataRow)
Refreshes all target textboxes from a row.
public virtual void RefreshTargetBoxes(DataRow Row)
Parameters
RowDataRow
RefreshTargetBoxes(DataRow, LocatorMapPlan)
Refreshes all target textboxes from a target row and mapping plan.
public virtual void RefreshTargetBoxes(DataRow Row, LocatorMapPlan Plan)
Parameters
RowDataRowPlanLocatorMapPlan
Search(TextBox)
Executes locator search.
protected virtual void Search(TextBox TextBox)
Parameters
TextBoxTextBox
SelectCurrentRow()
Selects the current popup row.
protected virtual void SelectCurrentRow()
SetTargetBoxValue(string, object)
Sets a textbox value.
public virtual void SetTargetBoxValue(string FieldName, object Value)
Parameters
TextBox_KeyDown(object, KeyEventArgs)
Handles text box key down.
protected virtual void TextBox_KeyDown(object Sender, KeyEventArgs Args)
Parameters
SenderobjectArgsKeyEventArgs
TextBox_TextChanged(object, TextChangedEventArgs)
Handles text changes.
protected virtual void TextBox_TextChanged(object Sender, TextChangedEventArgs Args)
Parameters
SenderobjectArgsTextChangedEventArgs
Events
RowSelected
Occurs when a locator source row is selected or cleared.
public event EventHandler<LocatorBoxRowEventArgs> RowSelected