Select to view content in your preferred language

how do you resolve targetname if your target object is in another xmal?

482
2
10-20-2010 12:14 PM
YinShi
by
Regular Contributor
I am using ArcGIS Silverlight 1.2, Silverlight 3 and VS2008 SP1.  I have a button which toggles the overview panel and the the overview panel is in another xmal. Does anyone know how to set the target via targetname if the target is in another xmal?

For example:
1) OverViewMapPanel is in MapView.xaml
<userControls:WindowPanel x:Name="OverviewMapPanel" >
2) I want to have a button in MainPage.xaml that toggles the visibility of OVerviewMapPanel. I tried the following code, but the compiler was not able to resolve the targetname.
<localViews:MapView x:Name="vwMap" />
<actions:ToggleVisibilityAction TargetName="vwMap.OverviewMapPanel" />

Thanks,
yin
0 Kudos
2 Replies
JenniferNery
Esri Regular Contributor
I don't see much documentation about it.
http://msdn.microsoft.com/en-us/library/system.windows.interactivity.targetedtriggeraction.targetnam...

TargetName is inherited from its Base class, TargetedTriggerAction. I googled and found most people put in the name of the element, which makes sense. I don't know if anyone has created action where the target is not an element of that page.

I think this is related and it was resolved, you guys can probably exchange solutions: http://forums.arcgis.com/threads/14380-Expand-Collapse-a-toolbar
0 Kudos
dotMorten_esri
Esri Notable Contributor
You can't reference target names across XAML files.
If you need a reference, create a property on the controls that you can use as a "binding bridge" between them.
0 Kudos