![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | Simple databinding question... In this snippet: <CheckBox x:Name="chk1">One</CheckBox> <CheckBox x:Name="chk2" IsChecked="{Binding ElementName=chk1, Path=IsChecked, Mode=OneWay}">Two</CheckBox> I expect chk1 to drive chk2, this is true until i manually change status of chk2, after that chk2 is no longed bound to chk1, is there any reason for this? -- Corrado Cavalli [Microsoft .NET MVP-MCP] UGIdotNET - http://www.ugidotnet.org Weblog: http://blogs.ugidotnet.org/corrado |
| | #2 (permalink) |
| Guest | RE: Simple databinding question... When the binding is one way, if you manually set the property on the target the binding will be discarded. The solution: use two-way binding or cache the binding before setting the value. See this thread for more details: http://forums.microsoft.com/MSDN/Sho...58462&SiteID=1 -- Valentin Iliescu [MVP - Client Application Development] "Corrado Cavalli [MVP]" wrote: > In this snippet: > > <CheckBox x:Name="chk1">One</CheckBox> > <CheckBox x:Name="chk2" IsChecked="{Binding ElementName=chk1, > Path=IsChecked, Mode=OneWay}">Two</CheckBox> > > > I expect chk1 to drive chk2, this is true until i manually change status of > chk2, after that chk2 is no longed bound to chk1, is there any reason for > this? > > > -- > Corrado Cavalli [Microsoft .NET MVP-MCP] > UGIdotNET - http://www.ugidotnet.org > Weblog: http://blogs.ugidotnet.org/corrado > > > > > |
| | #3 (permalink) |
| Guest | Re: Simple databinding question... Thanks Valentin! -- Corrado Cavalli [Microsoft .NET MVP-MCP] UGIdotNET - http://www.ugidotnet.org Weblog: http://blogs.ugidotnet.org/corrado |
| |
| |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| simple question... really! | husky86 | Vista General | 6 | 10-15-2007 01:33 AM |
| a simple question | =?Utf-8?B?YmlncmlnMDcyNA==?= | Vista General | 5 | 10-07-2006 12:30 PM |
| Simple Question | Sebastian | Avalon | 1 | 04-01-2006 05:24 PM |
| Trying to make simple databinding work | Griff | Avalon | 16 | 01-10-2006 03:53 PM |