![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
| |
| | #1 (permalink) |
| | DisplayMemberBinding or DisplayMemberPath? Again, this is not a technical help request, but I wonder if someone (from Microsoft or not) can think of a reason for the fact that in the ListBox there is a "DisplayMemberPath" property (allowing a developer to specify a binding path for the property to use from each item to be displayed in the list through ItemSource data-binding), but a ListView column (using GridView) has a similar, yet very different, "DisplayMemberBinding" property (this, not like DisplayMemberPath which is just a string, is of type Binding - so this one allows the developer to add a converter if he or she wants). Personally, I think that it should have been "DisplayMemberBinding" everywhere, as it's more powerful. But maybe there are good reasons for these not being implemented this way in the current version of WPF, and I assume someone could at least explain those reasons to me and others like me, who want to author controls themselves and don't know which route to follow, Path or Binding setting... One reason I could think of is that it is more difficult to make Binding values work in a binding-enabled environment. I know that DisplayMemberBinding of grid columns were in fact named DisplayMemberPath initially, in first WPF beta releases (and were simply strings). The binding behavior seems to have been added later, and maybe Microsoft couldn't do this for all the other classes also (ItemsControl, and maybe others). And myself in my controls I find it difficult to support the end-developer set up Binding objects for my control, instead of allowing him or her to only set up some paths, and me to create the bindings behind the scenes... But I don't know about this, is this the only reason? I needed to ask other people too. Thanks in advance for all your answers! Regards. Sorin Dolha, DlhSoft |
My System Specs![]() |