IsSynchronizedWithCurrentItem attribute and current item updates

前端 未结 1 827
心在旅途
心在旅途 2021-01-02 03:57

I have a view model to manage a dialog type of view that allows filtering of a listing (if necessary) and selection of an item. The code works fine whether I set IsSynchroni

1条回答
  •  心在旅途
    2021-01-02 04:31

    IsSynchronizedWithCurrentItem syncs the CurrentItem of the default CollectionView of the bound collection with the SelectedItem of your control.

    Since you never use the CurrentItem of the CollectionView and you do not appear to bind to the same collection twice setting the property in question has no visible effect at all.


    Demo of how the property syncs (for XAML viewers like XAMLPad):

    
        
            
                Apple
                Orange
                Pear
                Lime
            
        
        
            
                
                
                
                
            
        
    
    

    0 讨论(0)
提交回复
热议问题