This is a migrated thread and some comments may be shown as answers.

Map Culture/provider commands

2 Answers 91 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
figueiredorj asked on 28 Apr 2011, 01:00 PM

I am starting to work with silvelight in a map application.

One of my concerns is about localization/culture; after playing around a bit with map control I am missing how to set culture on map control.

It takes me to another point since I have done in past one other app with bing maps - how can i use commands from provider? I had look a bit on "provider comands" but not sure on how to use it. To me it would be something like this

MapProviderBase provider = InitializeBingMapProvider(MapMode.Road, true);
provider.Commands.Add(new CommandDescription() { ... } );

However in Command description I am missing on how to declare, for this example, "Culture" where param would be something like "PT-pt".

Can someone point me the light?

2 Answers, 1 is accepted

Sort by
Telerik team
answered on 03 May 2011, 08:38 AM
Hello Ricardo,

Could you, please elaborate a bit more on what kind of localization you are asking for? Do you mean localization of the UI controls or do you mean localization of the labels are visible on the Bing map tiles?

You can add custom command to the provider as following:

<UserControl x:Class="CustomCommand.MainPage"
     d:DesignHeight="300" d:DesignWidth="400">
        <DataTemplate x:Key="ButtonTemplate">
            <telerik:RadButton Command="{Binding Command}"
                   CommandParameter="{Binding CommandParameter}">
                <Grid HorizontalAlignment="Stretch">
                        <ColumnDefinition />
                        <ColumnDefinition Width="32" />
                    <TextBlock Text="My command"
                           FontWeight="Bold" />
    <Grid x:Name="LayoutRoot" Background="White">
        <telerik:RadMap x:Name="radMap" 
                <telerik:BingMapProvider Mode="Aerial" 
                     ApplicationId="You_Bing_Application_Id" />

using System;
using System.Windows;
using System.Windows.Controls;
using Telerik.Windows.Controls;
using Telerik.Windows.Controls.Map;
namespace CustomCommand
    public partial class MainPage : UserControl
        public MainPage()
            CommandDescription commandDescription = new CommandDescription()
                Command = new DelegateCommand(ExecuteCommand),
                CommandParameter = "test",
                DataTemplate = this.Resources["ButtonTemplate"] as DataTemplate
        private void ExecuteCommand(object parameter)
            MessageBox.Show(string.Format("My command: {0}", parameter));

Andrey Murzov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Top achievements
Rank 1
answered on 03 May 2011, 11:06 AM
Actually I was asking for localization of the map itself.

However I have already find out that the culture PT-pt is unavailable with bing provider.
Bad Luck...

But thanks on answering.
Asked by
Top achievements
Rank 1
Answers by
Telerik team
Top achievements
Rank 1
Share this question