开发者

Strange CommandParameter with View.CurrentItem

I have in ViewModel a collection, with ICollect开发者_如何学JAVAionView view; Well, in XAML I have

<Button ... Command="cmdDelete" CommandParameter="{Binding view.CurrentItem}" />

But it's strange because the CommandParameter is not resolved at the time of click. I get some values which don't reflect the CurrentItem.

Update: View is created as CollectionViewSource.GetDefaultView(observablecollection); and this collection is bound to the DataGrid.ItemsSource.


use this:

CommandParameter="{Binding view/}"
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜