SearchTextBox
A custom text box control that provides text hosting and also three embedded objects inside the control for commanding/custom action.
public class SearchTextBox : BinaryExtendedText
Inherits from / implements: BinaryExtendedText
Remarks
The control does everything a regular text box does. In addition, it has the following capabilities:
1. All extended text box features provided by our ExtendedTextBox control (i.e. BinaryExtendedText class) from our WinForms controls toolkit
2. Supports Cue text/banner text for displaying a watermark / placeholder text (with dimmed gray text fore color) while the user is yet to type any text in to the control
3. The Cue text/watermark/banner text is customizable
4. The control supports hosting 3 embedded visual objects inside the control, each representing a command invoker, in order to execute a particular functionality / command logic, viz., Search, Clear text, and an artifact to enable attaching a object to perform more commands on the control.
The control exposes several properties to customize the control's visual appearance, and also exposes three specific custom events (on text search request, clearing search text request and an options list drop-down request) to let your application handle them as deemed fit.
Members at a glance
SearchTextBox | Initializes a new instance of the SearchTextBox class. |
ClearSearchTextCommandInvokerImage | Gets or sets the clear search text command invoker image. |
CueText | Gets or sets the cue/banner text. |
DefaultDropListChevronBorderColor | Gets or sets the color of the default drop-list chevron border. |
DefaultDropListChevronBorderOnHoverColor | Gets or sets the color of the default drop-list chevron's border, upon hovering. |
DefaultDropListChevronBorderWidth | Gets or sets the width of the default drop-list chevron border. |
DefaultDropListChevronRotateFlipType | Gets or sets the rotate flip type of the default drop-list chevron. |
HoverColorForSearchDropListChevron | Gets or sets the hover color for search list drop down chevron. |
IsCueTextRenderedWhenInFocus | Gets or sets a value indicating whether the control should render cue/banner text even when the control is in focus. |
IsOnlyWatermarkProvider | Gets or sets whether the control enables the full search and extended events facilities, or is to simply render as a watermark text control. |
IsSearchCommandSetEnabled | Gets or sets a value indicating whether the control will provide search commands/events and render their respective visuals. |
IsSearchDropListOpenRequestCompleted | Gets or sets whether the search drop-list open request has been completed/handled. |
MarginBetweenTextAndCommandInvokers | Gets or sets the margin between text and command invokers. |
Multiline | Gets a value indicating whether this is a multi-line TextBox control. |
NormalColorForSearchDropListChevron | Gets or sets the normal color for search list drop down chevron. |
ScrollBars | Gets or sets which scroll bars should appear this control. |
SearchCommandInvokerImage | Gets or sets the search command invoker image. |
SearchDropListCommandChevronFillColor | Gets or sets the fill color of the search drop-list command chevron. |
SearchDropListCommandInvokerImage | Gets or sets the search drop-list command invoker image. |
OnDpiChangedAfterParent | Rebuilds the generated command glyphs when the box moves to a display with a different scale factor. |
OnFontChanged | Raises the FontChanged event. SearchTextBox overrides it so the control's own handling runs alongside the base behavior. |
OnParentChanged | Raises the ParentChanged event. SearchTextBox overrides it so the control's own handling runs alongside the base behavior. |
OnParentFontChanged | Raises the ParentFontChanged event. SearchTextBox overrides it so the control's own handling runs alongside the base behavior. |
OnResize | Raises the Resize event. SearchTextBox overrides it so the control's own handling runs alongside the base behavior. |
RefreshControlBlink | Performs control border blinking feature. |
ClearSearchTextRequested | Occurs when a clear search text is requested. |
SearchDropListOpenRequested | Occurs when a search drop-list opening is requested. |
TextSearchRequested | Occurs when a text search is requested. |
Constructors
SearchTextBox
Initializes a new instance of the SearchTextBox class.
Properties
ClearSearchTextCommandInvokerImage
Gets or sets the clear search text command invoker image.
CueText
Gets or sets the cue/banner text.
DefaultDropListChevronBorderColor
Gets or sets the color of the default drop-list chevron border.
DefaultDropListChevronBorderOnHoverColor
Gets or sets the color of the default drop-list chevron's border, upon hovering.
DefaultDropListChevronBorderWidth
Gets or sets the width of the default drop-list chevron border.
DefaultDropListChevronRotateFlipType
Gets or sets the rotate flip type of the default drop-list chevron.
HoverColorForSearchDropListChevron
Gets or sets the hover color for search list drop down chevron.
IsCueTextRenderedWhenInFocus
Gets or sets a value indicating whether the control should render cue/banner text even when the control is in focus.
IsOnlyWatermarkProvider
Gets or sets whether the control enables the full search and extended events facilities, or is to simply render as a watermark text control.
IsSearchCommandSetEnabled
Gets or sets a value indicating whether the control will provide search commands/events and render their respective visuals.
When the property is set to false, the search related visuals and capabilities, i.e. the search and clear search related events, are not enabled, but it will still render the drop-list command and its visual for any other generic use.
IsSearchDropListOpenRequestCompleted
Gets or sets whether the search drop-list open request has been completed/handled.
MarginBetweenTextAndCommandInvokers
Gets or sets the margin between text and command invokers.
Value. The margin between text and command invokers.
Multiline
Gets a value indicating whether this is a multi-line TextBox control.
NormalColorForSearchDropListChevron
Gets or sets the normal color for search list drop down chevron.
ScrollBars
Gets or sets which scroll bars should appear this control.
SearchCommandInvokerImage
Gets or sets the search command invoker image.
SearchDropListCommandChevronFillColor
Gets or sets the fill color of the search drop-list command chevron.
SearchDropListCommandInvokerImage
Gets or sets the search drop-list command invoker image.
Methods
OnDpiChangedAfterParent
Rebuilds the generated command glyphs when the box moves to a display with a different scale factor.
- e
- The event data.
OnFontChanged
Raises the FontChanged event. SearchTextBox overrides it so the control's own handling runs alongside the base behavior.
- e
- The data for the event.
OnParentChanged
Raises the ParentChanged event. SearchTextBox overrides it so the control's own handling runs alongside the base behavior.
- e
- The data for the event.
OnParentFontChanged
Raises the ParentFontChanged event. SearchTextBox overrides it so the control's own handling runs alongside the base behavior.
- e
- The data for the event.
OnResize
Raises the Resize event. SearchTextBox overrides it so the control's own handling runs alongside the base behavior.
- e
- The data for the event.
RefreshControlBlink
Performs control border blinking feature.
- shouldBlink
- true if the control should blink, otherwise false.
- blinkColor
- The desired color to use for the blinking operation.
Events
ClearSearchTextRequested
Occurs when a clear search text is requested.
SearchDropListOpenRequested
Occurs when a search drop-list opening is requested.
TextSearchRequested
Occurs when a text search is requested.