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

can i post now ?

3 Answers 92 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
dirk binternagel
Top achievements
Rank 1
dirk binternagel asked on 25 May 2010, 08:23 AM
Could it be, that beside me being stupid and not having a clue about wpf/silverlight, you guys duplicated the RadMap Tutorial for Silverlight and used it for RadMap WPF, and I tried to apply the silverlight tutorial to the wpf application and therefore get the error below ?

http://www.telerik.com/help/silverlight/map-create-basic-application-bing-maps.html



http://www.telerik.com/help/wpf/map-create-basic-application-bing-maps.html

?
----------------------------------------------------------------------
can i post now ?

sorry, but I got an error message when trying to reply to my previous thread. So, again ... I want to use RadControls for WPF. I have Visual Studio 2008 SP1 installed and the Telerik WPF Q1 2010. Telerik shows up fine in my Visual Studio Toolbar, the sample files are there and show up.

Now, when I try to follow the tutorial for RadMap ...

"

    1.   Open Visual Studio 2008.

    2.   Select File the main menu.

    3.   Select New, and then Project from the menu.

    4.   In the New Project dialog box, under the language of your choice (for example, Visual C#), select Silverlight.


"

I previously did not had the option "Silverlight" ... I installed Silverlight Tools and Silverlight SDK, then I got the option to choose Visual C# and Silverlight.

Next Step ...

"
Display a Map

Next, reference the map control in your project and display the default map in your application.

    1.    With the Silverlight project selected (not the Web project), select Project then Add Reference from the Visual Studio main menu.

    2.    In the Add Reference dialog box, click the Browse tab.
    3.    Browse to the location of your RadMap control installation, select the Telerik.Windows.Controls.DataVisualization.dll file and click OK.


"
When I try to add the Reference, I browse for the "Telerik.Windows.Controls.DataVisualization.dll" in the RadControls for WPF Q1 2010/Binaries/WPF/ ... Folder. When I try to add the .dll I get ...

"You can´t add a refernece to Telerik.Window.Controls.DataVisualistion.dll as it was not built against Silverlight runtime. Silverlight projects will only work with Silverlight assemblies"


So, that´s so far killing my attempt to follow the turial and use the wpf telerik RadMap component.

Help ?

Thanks d.







3 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 25 May 2010, 08:31 AM
Hi,

You've already posted! :)

Regards,
Vlad
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.
0
Andrey
Telerik team
answered on 27 May 2010, 07:32 AM
Hello Dirk,

We're sorry for incorrect steps of this help topic.
The correct instruction is the following:
    1.   Open Visual Studio 2008.
    2.   Select File the main menu.
    3.   Select New, and then Project from the menu.
    4.   In the New Project dialog box, under the language of your choice (for example, Visual C#), select Windows.
    5.   Select a WPF Application from the available templates, name it MapApplication, and then click OK.

Display a Map
Next, reference the map control in your project and display the default map in your application.
    1.    Select Project then Add Reference from the Visual Studio main menu.
    2.    In the Add Reference dialog box, click the Browse tab.
    3.    Browse to the location of your RadMap control installation, select the Telerik.Windows.Controls.DataVisualization.dll file and click OK.
    4.    Add "telerik" xml namespace in your Window. The Window1.xaml now looks like this:

<Window x:Class="MapApplication.Window1"
    Title="Window1" Height="300" Width="300">
    <Grid>
 </Grid>
</Window>

    5. Once the map control assembly is referenced, then you can add the map element <telerik:RadMap />. Your Window1.xaml looks like this:

<Window x:Class="MapApplication.Window1"
    Title="Window1" Height="300" Width="300">
    <Grid>
  <telerik:RadMap x:Name="RadMap1">
  </telerik:RadMap>
 </Grid>
</Window>

   6. Retrieve a Bing Maps key -- find the details in this article.
   7. Initialize RadMap Provider (use Bing Maps key from previous step for BingMapProvider.ApplicationId attribute), Center and Zoom properties. Your final Window1.xaml looks like this:

<Window x:Class="MapApplication.Window1"
    Title="Window1" Height="300" Width="300">
    <Grid>
  <telerik:RadMap x:Name="RadMap1"
      ZoomLevel="7"
      Center="42.697872, 23.321583">
   <telerik:RadMap.Provider>
    <telerik:BingMapProvider Mode="Aerial" IsLabelVisible="True"
           IsTileCachingEnabled="True"
           ApplicationId="xxxxxxyyyyyyy_zzzzzz" />
   </telerik:RadMap.Provider>
  </telerik:RadMap>
 </Grid>
</Window>

Greetings,
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.
0
dirk binternagel
Top achievements
Rank 1
answered on 27 May 2010, 02:23 PM
thank you
Tags
General Discussions
Asked by
dirk binternagel
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Andrey
Telerik team
dirk binternagel
Top achievements
Rank 1
Share this question
or