Make maptip values conditional

459
1
04-19-2013 09:35 AM
DonFreeman
New Contributor
Is it possible to make the presentation of maptip values conditional? For example a portion of my maptip contains this code.
<StackPanel Orientation="Horizontal">
 <TextBlock Text="NO2 - " Foreground="Black" />
 <TextBlock Text="{Binding [NOX]}" Foreground="Black" />
</StackPanel>

The value of NOX will be text either "Yes" or "No". I want the contents of this stackpanel to be visible only if the NOX value is "Yes". If the value is "No", I want the entire stackpanel to be hidden. Does anyone know of a way to accomplish this?
Thanks
0 Kudos
1 Reply
DaveTimmins
Occasional Contributor II
You could use a Visibility type converter and bind the stackpanel visibility to it, there is an example in this blog http://www.jeff.wilcox.name/2008/07/visibility-type-converter/

Cheers,
0 Kudos