ThemedImageConverter breaks my Bindings

Jul 11, 2012 at 11:35 PM

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.

Any suggestions for solving this issue?

Thx

Coordinator
Jul 11, 2012 at 11:54 PM

Oooo, any chance you can create a repo project and ticket for me so I can directly test against it?

Jul 12, 2012 at 8:35 AM

Hey,

Thx for the fast reply.

I saw that my example was pretty lame -> 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.

Best

https://skydrive.live.com/redir.aspx?cid=f088892266931520&page=self&resid=F088892266931520!154&parid=F088892266931520!153&authkey=!Av8TMvInkcWDn3g&Bpub=SDX.SkyDrive&Bsrc=Share

Coordinator
Jul 14, 2012 at 10:36 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Coordinator
Jul 16, 2012 at 2:08 AM

a fix has been checked in and should be resolved now

Jul 16, 2012 at 11:27 PM

Cool, thx.

So you I can use ConverterParameter instead of DataContext for the Imagepath