Solved

xaml PushPinItems

Posted on 2013-01-15
5
477 Views
Last Modified: 2013-01-24
Hello

Very new to xaml (possibly even missing the point completely!)

I believe the MapItemsControl is the way to go for data bound map overlays in Bing Maps.  The only example I can find is the snippet below.

Can someone explain what is happening here (especially the binding term)
Why do the examples use xaml ?  All those closing tags are so confusing.  Can someone vb.net it for me ?

<my:MapItemsControl x:Name="PushpinItems" Height="300">

            <my:MapItemsControl.ItemTemplate>

                <DataTemplate>

                    <my:Pushpin Location="{Binding Location}" >

                    </my:Pushpin>

                </DataTemplate>

            </my:MapItemsControl.ItemTemplate>

        </my:MapItemsControl>

Open in new window

0
Comment
Question by:Dodsworth
  • 3
  • 2
5 Comments
 
LVL 9

Expert Comment

by:sognoct
Comment Utility
example uses xaml because bing maps in wcf uses xaml for designer. You can define all parameter by xaml properties, like center of the map, graphic templates and so on.

The binding part defines how the pin are bound to the collection of data, that usually is an observable collection of objects. In this case it is bound to the property "location"

so you have a service that returns an observable collection of a certain class that contains a property location

I've found a full simple example (that uses xml data, maybe can be more familiar) of bound pushpin

http://beyondrelational.com/modules/2/blogs/433/posts/12005/bing-maps-binding-xml-data-source.aspx

another example (with pushpin bound to list / observable collection) :
http://beyondrelational.com/modules/2/blogs/433/posts/12005/bing-maps-binding-xml-data-source.aspxhttp://beyondrelational.com/modules/2/blogs/433/posts/12005/bing-maps-binding-xml-data-source.aspx

but ... if you are looking for an easier solution, just add pushpin to map without binding them.
0
 
LVL 1

Author Comment

by:Dodsworth
Comment Utility
ok.   I need to bind to a datasource using vb.net.
0
 
LVL 9

Expert Comment

by:sognoct
Comment Utility
my favorite example :

http://www.microsoft.com/maps/isdk/silverlight/#MapControlInteractiveSdk.Tutorials.DataBinding.TutorialMapItemsControl

this is a site of bingmaps with interactive code and samples
0
 
LVL 1

Author Comment

by:Dodsworth
Comment Utility
good but no VB :(
0
 
LVL 9

Accepted Solution

by:
sognoct earned 500 total points
Comment Utility
here is an example
silverlightexample.zip
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Using MS Code on my Mac 6 44
crm development 2 35
System32Int Error 8 44
Check if number is currency 15 29
This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
Here I am going to explain creating proxies at runtime for WCF Service. So basically we use to generate proxies using Add Service Reference and then giving the Url of the WCF service then generate proxy files at client side. Ok, what if something ge…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now