1

Closed

ThemedImageConverter breaks my Bindings

description

Started at: http://coding4fun.codeplex.com/discussions/362885
 
ThemedImageConverter is a pretty elegant helper to support light and dark Theme. However I have a problem with my Bindings now:
 
<Image Stretch="None"
Source="{Binding Converter={StaticResource ThemedImageConverter}, ConverterParameter={StaticResource PhoneBackgroundColor}}"
DataContext="/WP7SampleProject4;component/Images/{0}/appbar.feature.camera.rest.png"
isEnabled={Binding SomeViewModelStuff}"
/>
SomeViewModelStuff is not available anymore, because the DataContext for the Image has changed.
 

 
I saw that my example -> Image has no isEnabled Property. But I guess you got my point. Here is a little Example Project.
 
Should be self explaining: Two Images that Bind to a DesiredHeight Property of my Viewmodel. One uses the ThemedImageConverte, one doesn`t.

file attachments

Closed Jul 15, 2012 at 10:07 PM by
Breaking change from prior behavior but agreed this is the proper solution.

Checked in change set: 75848

comments