windowsforms-devexpress-dot-xtramap-dot-mapwebrequesteventargs.md
Gets or sets the value of the user-agent HTTP header.
Namespace : DevExpress.XtraMap
Assembly : DevExpress.XtraMap.v25.2.dll
NuGet Package : DevExpress.Win.Map
public string UserAgent { get; set; }
Public Property UserAgent As String
| Type | Description |
|---|---|
| String |
A String value of the user-agent HTTP header.
|
The following code snippets (auto-collected from DevExpress Examples) contain references to the UserAgent property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
winforms-map-connect-to-openstreetmap/CS/ConnectToOpenStreet/Form1.cs#L38
private void OnWebRequest(object sender, MapWebRequestEventArgs e) {
e.UserAgent = "Sample app with OSM tiles";
e.Referer = "https://www.mycompanysite.com/";
winforms-map-create-different-map-shapes/CS/MapItemsExample/Form1.cs#L112
private void openStreetMapDataProvider1_WebRequest(object sender, MapWebRequestEventArgs e) {
e.UserAgent = "Sample OSM map example";
e.Referer = "https://www.mycompanysite.com/";
winforms-map-use-openstreetmap-search-service/CS/OsmSearchSample/MainForm.cs#L30
private void DataProvider_WebRequest(object sender, MapWebRequestEventArgs e) {
e.UserAgent = "Sample app with OSM tiles and search";
e.Referer = "https://www.mycompanysite.com/";
winforms-map-connect-to-openstreetmap/VB/ConnectToOpenStreet/Form1.vb#L35
Private Sub OnWebRequest(ByVal sender As Object, ByVal e As MapWebRequestEventArgs)
e.UserAgent = "Sample app with OSM tiles"
e.Referer = "https://www.mycompanysite.com/"
winforms-map-create-different-map-shapes/VB/MapItemsExample/Form1.vb#L90
Private Sub openStreetMapDataProvider1_WebRequest(ByVal sender As Object, ByVal e As MapWebRequestEventArgs)
e.UserAgent = "Sample OSM map example"
e.Referer = "https://www.mycompanysite.com/"
See Also