CollectionViewSource不会更新ViewModel中的属性 [英] Collectionviewsource not updating the property in viewmodel

查看:57
本文介绍了CollectionViewSource不会更新ViewModel中的属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<cmc:AutoRefreshCollectionViewSource

             x:Uid="CollectionViewSource_1" x:Key='sortedList'

                              Source="{Binding Path=MyList, Mode=TwoWay}" >
                <cmc:AutoRefreshCollectionViewSource.SortDescriptions>
                    <scm:SortDescription x:Uid="scm:SortDescription_1" PropertyName="HoldingRegister"

                                     Direction="Ascending" />
                </cmc:AutoRefreshCollectionViewSource.SortDescriptions>
            </cmc:AutoRefreshCollectionViewSource>




该collectionViewSource绑定到列表视图
如上面的代码MyList一样,ViewModel中的Observable集合


在这里进行排序,但是collectionviewsource没有更新回MyList

请提供解决此问题的建议




This collectionViewSource is binded to a list view
As the above code MyList the Observable collection in ViewModel


here sorting is happening but the collectionviewsource is not updating back to MyList

pls advice to solve this problem

推荐答案

最有可能在view和viewmodel之间丢失变量的拼写.
(请记住,这是区分大小写的.)

问候
Piet
Most likely a miss spelling of your variables between view and viewmodel.
(Remember it is case sensitive).

Regards
Piet


这篇关于CollectionViewSource不会更新ViewModel中的属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆