Two-way data binding with ColorPicker Demo

Hi,

To gt my head around two way data binding on custom controls I've been trying to bind the Color property of tow of the samle ColorPickers. I'm probably just overlooking something completly obvious but I can't for the life of me see what it is.

T add to the confusion the individual bytes Red, Green and Ble bind with no trouble.

Any help shaking the cobwebs from my head would be greatly appreciated.

You can find the demo here: ms-help://MS.MSDNQTR.v80.en/MS.MSDN.v80/MS.WinFX4VS.1033/wpf_conceptual/html/ecb97ed4-e659-48a4-a1e0-893309569f2f.htm

Thanks,

Andrew



Answer this question

Two-way data binding with ColorPicker Demo

  • Jim Danger

    This is actually a bug in the sample.

    I create a binding in code to connect the sub-properties to the color property.

    The problem: when you set your own binding, it nukes the binding I have in the control.

    The color picker *should not* be using binding internally, because it breaks using binding externally.

    My bad. :-)



  • TrackerX

    Ok that makes sense, thanks! And it also means I'm not crazy

    Andrew


  • JeffGill

    That's a great comfort, thanks!
  • yangjie

    At a minimum, you are less crazy than I am. ;-)

  • Two-way data binding with ColorPicker Demo