windowsforms-devexpress-dot-xtramap-dot-mapsearchpaneloptions-54449492.md
Gets or sets the number of visible locations on the list produced by the search request.
Namespace : DevExpress.XtraMap
Assembly : DevExpress.XtraMap.v25.2.dll
NuGet Package : DevExpress.Win.Map
[DefaultValue(7)]
public int MaxVisibleItemCount { get; set; }
<DefaultValue(7)>
Public Property MaxVisibleItemCount As Integer
| Type | Default | Description |
|---|---|---|
| Int32 | 7 |
A value that limits the number of visible resulting locations.
|
You can access this nested property as listed below:
| Object Type | Path to MaxVisibleItemCount |
|---|---|
| MapControl |
.SearchPanelOptions .MaxVisibleItemCount
|
A user can scroll the search panel’s drop-down list to see the other results of the search request.
The following example configures the search panel options such as width, prompt message, and so on:
using DevExpress.XtraMap;
private void OnFormLoad(object sender, EventArgs e) {
// Enable search:
InformationLayer infoLayer = new InformationLayer();
mapControl1.Layers.Add(infoLayer);
BingSearchDataProvider searchProvider = new BingSearchDataProvider();
infoLayer.DataProvider = searchProvider;
searchProvider.BingKey = bingKey;
// Specify search panel options:
mapControl1.SearchPanelOptions.Visible = true;
mapControl1.SearchPanelOptions.ShowNullValuePrompt = true;
mapControl1.SearchPanelOptions.NullValuePrompt = "Type a location to search...";
mapControl1.SearchPanelOptions.MaxVisibleItemCount = 3;
mapControl1.SearchPanelOptions.Width = 200;
}
Imports DevExpress.XtraMap
Private Sub OnFormLoad(ByVal sender As Object, ByVal e As EventArgs)
' Enable search:
Dim infoLayer As InformationLayer = New InformationLayer()
mapControl1.Layers.Add(infoLayer)
Dim searchProvider As BingSearchDataProvider = New BingSearchDataProvider()
infoLayer.DataProvider = searchProvider
searchProvider.BingKey = bingKey
' Specify search panel options:
mapControl1.SearchPanelOptions.Visible = True
mapControl1.SearchPanelOptions.ShowNullValuePrompt = True
mapControl1.SearchPanelOptions.NullValuePrompt = "Type a location to search..."
mapControl1.SearchPanelOptions.MaxVisibleItemCount = 3
mapControl1.SearchPanelOptions.Width = 200
End Sub
See Also