Click here to Skip to main content
15,894,907 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: Data binding from a List to a Grid Pin
Mark Salsbery25-Jun-09 6:58
Mark Salsbery25-Jun-09 6:58 
GeneralRe: Data binding from a List to a Grid Pin
fjparisIII25-Jun-09 7:31
fjparisIII25-Jun-09 7:31 
GeneralRe: Data binding from a List to a Grid Pin
Mark Salsbery25-Jun-09 7:48
Mark Salsbery25-Jun-09 7:48 
GeneralRe: Data binding from a List to a Grid Pin
fjparisIII25-Jun-09 8:30
fjparisIII25-Jun-09 8:30 
GeneralRe: Data binding from a List to a Grid Pin
fjparisIII25-Jun-09 7:39
fjparisIII25-Jun-09 7:39 
GeneralRe: Data binding from a List to a Grid Pin
Pete O'Hanlon25-Jun-09 9:07
mvePete O'Hanlon25-Jun-09 9:07 
GeneralRe: Data binding from a List to a Grid Pin
fjparisIII25-Jun-09 9:29
fjparisIII25-Jun-09 9:29 
AnswerRe: Data binding from a List to a Grid Pin
Mark Salsbery25-Jun-09 7:23
Mark Salsbery25-Jun-09 7:23 
In addition to my other reply...

The magic DataContext:

Any time you have a binding that doesn't explicitly set a source (be it a direct
source, RelativeSource, etc), then an attempt is made to bind to the object set
on the DataContext property of the target element.

If there's a DataContext set and the Path of the binding is not found on that object,
then the binding silently fails (almost silently - you'll get a handy warning in the
debugger output window).

If no DataContext is set on the element, then the system walks up the tree and tries the next
(parent) element's DataContext. This is repeated to the root element. If a source
still wasn't found after all that, the binding will fail and you'll get the message in the
debugger output window.

This allows you to set the DataContext at an appropriate place in the tree so it is
accessible by more than a single element if necessary - very flexible.

Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

GeneralRe: Data binding from a List to a Grid Pin
fjparisIII25-Jun-09 7:40
fjparisIII25-Jun-09 7:40 
GeneralRe: Data binding from a List to a Grid Pin
Mark Salsbery25-Jun-09 7:46
Mark Salsbery25-Jun-09 7:46 
GeneralRe: Data binding from a List to a Grid Pin
fjparisIII25-Jun-09 8:33
fjparisIII25-Jun-09 8:33 
AnswerRe: Data binding from a List to a Grid (Everything works now) [modified] Pin
fjparisIII25-Jun-09 12:19
fjparisIII25-Jun-09 12:19 
QuestionWPF Slider project Pin
fgimenez24-Jun-09 8:14
fgimenez24-Jun-09 8:14 
AnswerRe: WPF Slider project Pin
Christian Graus24-Jun-09 15:26
protectorChristian Graus24-Jun-09 15:26 
GeneralRe: WPF Slider project Pin
fgimenez29-Jun-09 2:49
fgimenez29-Jun-09 2:49 
QuestionSilverlight2Chat Pin
deep7624-Jun-09 4:59
deep7624-Jun-09 4:59 
AnswerRe: Silverlight2Chat Pin
Mark Salsbery24-Jun-09 7:35
Mark Salsbery24-Jun-09 7:35 
GeneralRe: Silverlight2Chat Pin
deep7624-Jun-09 7:41
deep7624-Jun-09 7:41 
GeneralRe: Silverlight2Chat Pin
Mark Salsbery24-Jun-09 7:49
Mark Salsbery24-Jun-09 7:49 
GeneralRe: Silverlight2Chat Pin
deep7624-Jun-09 8:04
deep7624-Jun-09 8:04 
GeneralRe: Silverlight2Chat Pin
Mark Salsbery24-Jun-09 8:25
Mark Salsbery24-Jun-09 8:25 
GeneralRe: Silverlight2Chat Pin
deep7624-Jun-09 8:37
deep7624-Jun-09 8:37 
GeneralRe: Silverlight2Chat Pin
Mark Salsbery24-Jun-09 9:00
Mark Salsbery24-Jun-09 9:00 
GeneralRe: Silverlight2Chat Pin
deep7624-Jun-09 9:52
deep7624-Jun-09 9:52 
QuestionRe: Silverlight2Chat Pin
Mark Salsbery24-Jun-09 12:06
Mark Salsbery24-Jun-09 12:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.