-
Notifications
You must be signed in to change notification settings - Fork 2
Home
Dirkster99 edited this page Jan 25, 2019
·
12 revisions
The SuggestBox control supports the following API to support viewmodel binding and standard communication within an MVVM application:
Dependency Property | Description |
---|---|
ICommand TextChangedCommand |
Gets/sets a command that should be executed whenever the text in the textbox portion of this control has changed. |
string Hint |
Gets/sets a Watermark Hint that is shown if the user has not typed anything, yet, and if IsHintVisible is configured accordingly. |
bool IsHintVisible |
Gets/sets whether Watermark in the textbox portion of suggestion box is currently visible or not. |
bool ValidText |
Gets/sets whether the current text should be marked as invalid (control shows a red rectangle around the textbox portion) or not. |
ValidationRule PathValidation |
Gets/sets a ValidationRule that must be present to show a validation error (red rectangle around textbox) if user entered invalid data (The property has a default validation rule set) |
Dependency Property | Description |
---|---|
bool EnableSuggestions |
Gets/sets whether suggestions should currently be queried and viewed or not. |
bool IsPopupOpened |
Gets/sets whether the Popup portion of the control is currently open or not. |
IEnumerable ItemsSource |
Gets/sets an IEnumerable ItemsSource for the list of objects that pops up when the user has entered some text. Ideally, this should be an ObservableCollection<T> since the control with look for the INotifyCollectionChanged event in order to listen for this type of event. |
DataTemplate ItemTemplate |
Gets/sets the ItemTemplate for the ListBox portion of the suggestion popup. |
string DisplayMemberPath |
Gets/sets the DisplayMemberPath for the ListBox portion of the suggestion popup. |
string SelectedValuePath |
Gets/sets the SelectedValuePath for the ListBox portion of the suggestion popup. |
bool IsDeferredScrolling |
Gets/sets whether the scrollbar ListBox inside the suggestions PopUp control is directly linked to scrolling the content or not (is deferred). This property is handled by the control itself and should not be used via binding. |
Brush PopupBorderBrush |
Gets/sets the Brush of the border in the popup of the suggestion box. |
Thickness PopupBorderThickness |
Gets/sets the Thickness of the border in the popup of the suggestion box. |
Event | Description |
---|---|
event RoutedEventHandler ValueChanged |
Gets/sets a routed event handler that is invoked whenever the value of the Textbox.TextProperty of this textbox derived control has changed. |
event EventHandler<NextTargetLocationArgs> NewLocationRequestEvent |
Implements a location changed event, which is raised when the user types a certain key gesture (Enter == OK, Escape == Cancel) to inform the client application that another location change request is available. |