Skip to content
Dirkster99 edited this page Jan 19, 2019 · 12 revisions

The SuggestBox control supports the following API to support viewmodel binding and standard communication within an MVVM application:

TextBox

Dependency Property Description
ICommandTextChangedCommand 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 consfigured accordingly.
bool IsHintVisible Gets/sets whether Watermark in the textbox portion of suggestion box is currently visible 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.
bool ValidText Gets/sets whether the current text should be marked as invalid (control shows a red rectangle around the textbox portion or not).

ListBox in Suggestions Pop-up control

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.
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.
DataTemplate ItemTemplate Gets/sets the ItemTemplate for the ListBox portion of the suggestion popup.
Brush PopupBorderBrush Gets/sets the Brush of the border in the popup of the suggestion box.
Thickness PopupBorderThickness Gets/sets the of the border in the popup of the suggestion box.
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.
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.
Clone this wiki locally