Map Culture/provider commands

3 posts, 0 answers
  1. figueiredorj
    figueiredorj avatar
    68 posts
    Member since:
    Mar 2011

    Posted 28 Apr 2011 Link to this post


    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. Andrey
    Andrey avatar
    1681 posts

    Posted 03 May 2011 Link to this post

    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
  3. DevCraft R3 2016 release webinar banner
  4. figueiredorj
    figueiredorj avatar
    68 posts
    Member since:
    Mar 2011

    Posted 03 May 2011 Link to this post

    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.
Back to Top