none
Bug in TextBlock Foreground Binding RRS feed

  • General discussion

  • I believe I have found a very unusual bug in WPF 4.0 (may well be in 3.51 also, but haven't tried it).

    If you have Bindings (Multibinding in my case) on both the Text and Foreground property of a TextBlock element, and the Foreground binding has a Fallback value different than the Foreground.DefaultMetadata.DefaultValue (Black by default) then if you ClearBinding, SetBinding, SetValue, ClearValue on only the Foreground property, not only will it Get rid of the Foreground binding, it also incorrectly gets rid of the Text property binding.

    This took a while to pin down.

     


    Ken
    Tuesday, August 16, 2011 6:32 PM

All replies