Solved

xaml PushPinItems

Posted on 2013-01-15
5
481 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
ID: 38779279
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
ID: 38781881
ok.   I need to bind to a datasource using vb.net.
0
 
LVL 9

Expert Comment

by:sognoct
ID: 38782125
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
ID: 38782291
good but no VB :(
0
 
LVL 9

Accepted Solution

by:
sognoct earned 500 total points
ID: 38786660
here is an example
silverlightexample.zip
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to prevent website from publishing with errors 9 44
VB.NET Repostiory Pattern 7 35
VB.Net - TypeInitializer Error 25 25
Store results in vb.net 3 20
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

786 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