Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
I have an ItemsControl that is bound to a collection like so:
<ItemsControl ItemsSource="{Binding Path=AllComponents, NotifyOnSourceUpdated=True, NotifyOnTargetUpdated=True}" x:Name="myItemsControl" SourceUpdated="Components_Updated">


Event Handler:
private void Components_Updated(object sender, DataTransferEventArgs e)
        {
            //stuff goes here
        }


The only problem is that the SourceUpdated event never fires when I add something to the collection. My handler never gets called.

Anyone know how to fix this?
Posted

1 solution

Is there a PreviewSourceUpdated ? I found that the Preview events are always called, but the events are not, because something higher up the tree can stop them.
 
Share this answer
 
Comments
industryunleash 23-Jul-10 10:06am    
no, no PreviewSourceUpdated

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900