A newer version of this page is available. Switch to the current version.

BingRouteOptions.Mode Property

Gets or sets a value that defines how a route should be calculated.

Namespace: DevExpress.Xpf.Map

Assembly: DevExpress.Xpf.Map.v18.2.dll

Declaration

public BingTravelMode Mode { get; set; }

Property Value

Type Description
BingTravelMode

A BingTravelMode enumeration value.

Available values:

Name Description
Driving

A route is calculated for a car or another vehicle that is moving at a similar speed.

Walking

A route is calculated for a pedestrian or a vehicle that is moving at a similar speed.

Property Paths

You can access this nested property as listed below:

Object Type Path to Mode
BingRouteDataProvider
.RouteOptions.Mode

Examples

<ObjectDataProvider x:Key="BingTravelModeValues" 
                    ObjectType="{x:Type sys:Enum}" MethodName="GetValues">
    <ObjectDataProvider.MethodParameters>
        <x:Type TypeName="dxm:BingTravelMode"/>
    </ObjectDataProvider.MethodParameters>
</ObjectDataProvider>
    <dxm:InformationLayer EnableHighlighting="False" EnableSelection="False">
        <dxm:InformationLayer.DataProvider>
            <dxm:BingRouteDataProvider x:Name="routeProvider" 
                BingKey="{Binding Source={StaticResource bingKey}}"
                RouteCalculated="routeDataProvider_RouteCalculated">
                <dxm:BingRouteDataProvider.RouteStrokeStyle>
                    <dxm:StrokeStyle Thickness="10" DashCap="Round" 
                                     StartLineCap="Round" EndLineCap="Round" />
                </dxm:BingRouteDataProvider.RouteStrokeStyle>
                <dxm:BingRouteDataProvider.RouteOptions>
                    <dxm:BingRouteOptions 
                        Mode="{Binding ElementName=lbMode, Path=SelectedValue}"
                        RouteOptimization="{Binding ElementName=lbRouteOptimization, Path=SelectedValue}"/>
                </dxm:BingRouteDataProvider.RouteOptions>
            </dxm:BingRouteDataProvider>
        </dxm:InformationLayer.DataProvider>
    </dxm:InformationLayer>
        <ListBox x:Name="lbMode" Margin="4,2,4,2" SelectedIndex="0" 
                      ItemsSource="{Binding Source={StaticResource BingTravelModeValues}}"/>
See Also