Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
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.

Go Back   Vista Forums > Misc Newsgroups > Avalon

Vista - DisplayMemberBinding or DisplayMemberPath?

 
 
Old 10-31-2007   #1 (permalink)
Sorin Dolha


 
 

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 SpecsSystem Spec
 

Thread Tools



Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46