Is it possible to bind to specific explicit interface members?

286 views
Skip to first unread message

Bill Kempf

unread,
Aug 5, 2008, 4:30:18 PM8/5/08
to wpf-di...@googlegroups.com
Is there binding path syntax to handle this?  A more specific question.  Say we have some object that implements several interfaces.  Two of the interfaces have identical indexer signatures, with one or both explicitly implemented to allow compilation.  Now we want to bind to one of the indexers.  Is it possible to specify which one using a simple binding expression, or will we have to resort to using a converter here?

--
Quidquid latine dictum sit, altum sonatur.
- Whatever is said in Latin sounds profound.

War is peace. Freedom is slavery. Bugs are features.

Josh Smith

unread,
Aug 5, 2008, 4:41:18 PM8/5/08
to wpf-di...@googlegroups.com
Yes you can Bill, as seen below:

Prop="{Binding Path=(local:IFoo.Bar)}"

Josh

Bill Kempf

unread,
Aug 5, 2008, 4:44:44 PM8/5/08
to wpf-di...@googlegroups.com
So attached property syntax is used for this?  Where's that documented :).
 
Thanks.

Josh Smith

unread,
Aug 5, 2008, 4:45:37 PM8/5/08
to wpf-di...@googlegroups.com
No, it just resembles attached property syntax.  Dox: http://msdn.microsoft.com/en-us/library/ms742451.aspx
Reply all
Reply to author
Forward
0 new messages