Answer the question
In order to leave comments, you need to log in
How to write data from a list to a CollectionViewSource resource?
Good day to all. I have a question, how can I write to the CollectionViewSource resource the data that is in the List (List) with the object type?var datatable = new List<object>();
<Window.Resources>
<local:Tasks x:Key="tasks"/>
<CollectionViewSource x:Key="cvsTasks" Source="{StaticResource tasks}" Filter="CollectionViewSource_Filter"/>
</Window.Resources>
Answer the question
In order to leave comments, you need to log in
CollectionViewSource collection = TryFindResource("cvsTasks") as CollectionViewSource;
collection.Source = _tasks;
List<object> _tasks = new List<object>();
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question