Is it possible to bind to specific explicit interface members?

已查看 287 次
跳至第一个未读帖子

Bill Kempf

未读,
2008年8月5日 16:30:182008/8/5
收件人 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

未读,
2008年8月5日 16:41:182008/8/5
收件人 wpf-di...@googlegroups.com
Yes you can Bill, as seen below:

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

Josh

Bill Kempf

未读,
2008年8月5日 16:44:442008/8/5
收件人 wpf-di...@googlegroups.com
So attached property syntax is used for this?  Where's that documented :).
 
Thanks.

Josh Smith

未读,
2008年8月5日 16:45:372008/8/5
收件人 wpf-di...@googlegroups.com
No, it just resembles attached property syntax.  Dox: http://msdn.microsoft.com/en-us/library/ms742451.aspx
回复全部
回复作者
转发
0 个新帖子