Controlling map from a separate window

459
6
04-20-2012 07:38 AM
JaredWhite
New Contributor III
I've just recently learned silverlight and am still quite new to it's functions/language.
I've been tasked with writing an application that has a control panel window with the standard esri tools (legend, navigation tabs, zoom slider, layer selection etc.) and separate windows that display the map.
So far I'm at a loss on how to achieve this. I've tried data-binding and dependency properties to no luck. Does anyone have suggestions on how to do this?
0 Kudos
6 Replies
JenniferNery
Esri Regular Contributor
This seems related thread: http://forums.arcgis.com/threads/15944-How-to-binding-mainpage-s-map. I've attached a sample that mimics this SDK sample: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#ClosestFacility, only the controls reside in another UserControl. This required use of DependencyProperty Map.
0 Kudos
JaredWhite
New Contributor III
I guess I should reiterate. The app I'm making will be controlled by control window, including a "control map" which will include zoom, pan etc. and have a "display map" in a separate window that mirrors the control map (receives all the commands the control map receives, but has a separate zoom extent). How do I get two of the same map displayed in the application and how would I pipe all those controls across windows?
0 Kudos
dotMorten_esri
Esri Notable Contributor
0 Kudos
JaredWhite
New Contributor III
No good. The program is OOB and has to be portable to WPF, LocalMessageSender is silverlight native, and uses the published website as glue.
0 Kudos
JaredWhite
New Contributor III
Have you looked at the LocalMessageSender api?
http://geekswithblogs.net/PeterTweed/archive/2009/07/26/inter-silverlight-application-communication-...


Thanks for the suggestion, but like I said in my first post, I'm still very new to silverlight. How can LocalMessageSender be used to mirror a map, espescially when not all properties on a map are dependency based. Also, how could i implement this in a OOB silverlight app with truly separate windows. it seems the example you showed me uses the website end of the app as the glue between the two "windows"
0 Kudos
dotMorten_esri
Esri Notable Contributor
There is no way I know of that works both in WPF and Silverlight. You would have to create an abstraction layer that abstracts the specifics of Silverlight and WPF if you want some common functionality.
If I recall, LocalMessageSender only allow you to send short strings across, so you could be sending the map-extent over as four doubles separated by a comma and then parse it back in the recieving end.
0 Kudos