阅读背景:

绑定依赖于列表框中的Usercontrol属性。

来源:互联网 

I need ListBox with my UserControl listed in it. My UserControl has TextBox. So I want to display property of List's subitem in UserControl's textBox. I have tried a lot of options with DataContext and ElementName - it just doesn`t work. I just stucked on it. The only way to make it work is to remove DataContext binding of UserControl to itself and change Item Property name so it matches to DependencyProperty name - but I need to reuse my control in different viewmodels with different entities so it is almost not possible to use the approach.I need ListBox with my UserControl listed in it




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: