c# - WPF Polyline's converter not invoked when item added to bound ObservableCollection -


With an icon at each point, in my application there is a line through a set of digits I have a canvas element The following is XAML inside:

   & Lt; Setter property = "canvas.Tap" value = "{binding wai, converter = {static resource canvas icon centrector}}" /> & Lt; / Style & gt; & Lt; /ItemsControl.ItemContainerStyle> & Lt; ItemsControl.ItemTemplate & gt; & Lt; DataTemplate & gt; & Lt; Image Source = "Graphics \ Icons \ x.png" width = "20" Height = "20" /> & Lt; / DataTemplate & gt; & Lt; /ItemsControl.ItemTemplate> & Lt; / ItemsControl>  

Selected routes. ITEMS is an Observable Collection. The problem is that when Polyline is not updated and the item is added to SelectedRoute.Items. When an item is added to the item, the icon is added. The line is also drawn correctly, if I change the bound item of the selected route separately and then return it appears to be a problem especially with polyline .

When I debug, I can see that the polyline is not called a converter when an item is added. Why is this happening?

Note, I have found an alternative solution, but it wants to understand why it is not working in the solution.

only ItemsControl.ItemsSource for property INotifyCollectionChanged WPF registers for updates. It does not really do anything with the binding extension, you can modify any archive that is implementing INSetCollectionChanged without directly biting property (i.e. Binding ), and items will be informed about the control changes, the item property should be burned to PropertyChanged event.

Whenever you change the archive, you can set it "manually".


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -