Select to view content in your preferred language

Changing the pop up heading?

5080
6
Jump to solution
05-08-2012 09:45 AM
KarenEllett
Regular Contributor
I know that right now, the silverlight viewer uses one of the field values as the heading for the popup window, and that I can choose which heading.  Is it possible to create an addin tool or map behavior that would change that heading to the name of the layer instead? 

Thanks!
0 Kudos
1 Solution

Accepted Solutions
JeffMcConnell
Occasional Contributor
OnClickPopupContainerStyle.xaml located in Config/Layouts/ResourceDictionaries/Common contains the datatemplate for the popup changing line number 755 from:

<TextBlock Text="{Binding PopupItem.Title}" Grid.Row="0"

to

<TextBlock Text="{Binding PopupItem.LayerName}" Grid.Row="0"

will display the Layer Name instead of the Title (Primary Display Field)

View solution in original post

0 Kudos
6 Replies
JeffMcConnell
Occasional Contributor
OnClickPopupContainerStyle.xaml located in Config/Layouts/ResourceDictionaries/Common contains the datatemplate for the popup changing line number 755 from:

<TextBlock Text="{Binding PopupItem.Title}" Grid.Row="0"

to

<TextBlock Text="{Binding PopupItem.LayerName}" Grid.Row="0"

will display the Layer Name instead of the Title (Primary Display Field)
0 Kudos
GreggCornetski
Occasional Contributor

This tweak works as expected when run from my dev machine. But when I deploy the app to the production server, the popup reverts to its original out-of-the-box appearance, i.e. displays the PopupItem.Title.

When I delete Config\Layouts\ResourceDictionaries\Common\OnClickPopupContainerStyle.xaml from both my dev and production server, and the popups on both show only the original out-of-the-box appearance, i.e. display the PopupItem.Title.

This indicates the popup has a default template that is defined elsewhere, but more importantly, this means my production server is unable to override the default template by applying the OnClickPopupContainerStyle.xaml.

Any ideas why the production version will not apply OnClickPopupContainerStyle.xaml? I wonder if it is a file/folder permission issue with Config\Layouts\ResourceDictionaries\Common\OnClickPopupContainerStyle.xaml on the production server.

0 Kudos
KarenEllett
Regular Contributor
My hero!

Thanks so much!
0 Kudos
JamalNUMAN
Legendary Contributor
OnClickPopupContainerStyle.xaml located in Config/Layouts/ResourceDictionaries/Common contains the datatemplate for the popup changing line number 755 from:

<TextBlock Text="{Binding PopupItem.Title}" Grid.Row="0"

to

<TextBlock Text="{Binding PopupItem.LayerName}" Grid.Row="0"

will display the Layer Name instead of the Title (Primary Display Field)


Hi Jeff,

I tried it but sounds that the name of the layer still doesn�??t appear in the pop up

[ATTACH=CONFIG]24734[/ATTACH]


What might be the issue?

Thanks

Jamal
----------------------------------------
Jamal Numan
Geomolg Geoportal for Spatial Information
Ramallah, West Bank, Palestine
0 Kudos
TomMagdaleno
Frequent Contributor
I'm having the same problem as Jamal.  It doesn't work.  Their must be some small piece of code that needs to be tweaked to make it work.
0 Kudos
brettangel
Frequent Contributor
I'm having the same problem as Jamal.  It doesn't work.  Their must be some small piece of code that needs to be tweaked to make it work.


Try deleting your internet browsing history and reopening.
0 Kudos