MapWebRequestEventArgs.Proxy Property
Gets or sets proxy information for the request.
Namespace: DevExpress.Xpf.Map
Assembly: DevExpress.Xpf.Map.v19.2.dll
Declaration
Property Value
Type | Description |
---|---|
IWebProxy | The IWebProxy that is used to proxy the request. |
Example
This example shows how you can implement a custom proxy to make a request for map tiles from the Bing Maps web service.
To customize a web request, handle the MapImageDataProviderBase.WebRequest event. Then, use the web request arguments to specify your custom map request settings (e.g., custom MapWebRequestEventArgs.Credentials, MapWebRequestEventArgs.Headers for a proxy, etc.) to the Bing Maps data provider.
Note
A complete sample project is available at https://github.com/DevExpress-Examples/how-to-customize-a-web-request-for-a-map-web-service-e4806.
<Window
x:Class="WebRequest.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:dxm="http://schemas.devexpress.com/winfx/2008/xaml/map"
Title="MainWindow" Height="350" Width="525">
<Grid>
<dxm:MapControl Name="mapControl1" >
<dxm:ImageTilesLayer x:Name="imageTilesLayer">
<dxm:ImageTilesLayer.DataProvider>
<dxm:BingMapDataProvider BingKey="INSERT_YOUR_BING_KEY_HERE"
WebRequest="BingMapDataProvider_WebRequest"/>
</dxm:ImageTilesLayer.DataProvider>
</dxm:ImageTilesLayer>
<dxm:VectorLayer>
<dxm:MapDot Location="54.196353,37.611622" Size="10"/>
</dxm:VectorLayer>
</dxm:MapControl>
</Grid>
</Window>
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Proxy 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.