How to find a telerik radmap control in viewmodel

Feb 6, 2012 at 6:17 AM
Edited Feb 6, 2012 at 7:54 AM

I am use telerik radmap control with Caliburn.Micro,I want to find the radmap control  in viewmodel, and use the control name to change its' provider in viewmodel ,how can I do?  

my view code is like 

        <telerik:RadMap Name="Map"                       

                   Margin="0 0 0 0"                       

                  HorizontalAlignment="Left"                       

                 VerticalAlignment="Top"                        Center="16.5,130.4"                        CommandBarVisibility="Collapsed"                        MouseLocationIndicatorVisibility="Collapsed"                        NavigationVisibility="Collapsed"                        ScaleVisibility="Collapsed"                        ZoomBarPresetsVisibility="Collapsed"                        ZoomBarVisibility="Collapsed"                        ZoomLevel="4">            <telerik:RadMap.Provider>                <local:GoogleMapProvider x:Name="GoogleProvider" />            </telerik:RadMap.Provider>        </telerik:RadMap>

Coordinator
Feb 6, 2012 at 12:12 PM

I'm not familiar with this control, but here is an idea: Think about using databindg with a value converter. For example, you could bind the Provider property of the RadMap to a string property on your view model. You could then use a value converter to convert from the string to the actual provider instance. For example, "Google" would map to the GoogleProvider.