Note that there are some explanatory texts on larger screens.

plurals
  1. POWPF Listview flickering problem
    primarykey
    data
    text
    <p>I am using a thread for reading the file and make a array of objects from the data read.A seperate thread for filtering records based on some filters is being used. I am using listview to show data for dataset I get as per above.</p> <p>While laoding a file everthing seems good but when I search,the problem exists.</p> <p>while searching when I apply filters for the 1st time, everything is okay. Now again when I apply filters, data of the previous search is show for 1 sec(kind of flicker) and then the new data according to current filter is rendered. I am using dispatcher for updating UI. Before I bind any data, I try to clear ListView ItemSource by setting it to null</p> <p>XAML code i am using is : {</p> <pre><code> &lt;ListView Name="listView1" Grid.Row="0" ItemsSource= "{Binding ElementName=Window1, Path=Entries}" AllowDrop="True" SelectionChanged="listView1_SelectionChanged" Drop="listView1_Drop"&gt; &lt;ListView.View&gt; &lt;GridView x:Name="GridView1" &gt; &lt;GridViewColumn Header="Item" DisplayMemberBinding="{Binding Item}" /&gt; &lt;GridViewColumn Header="TimeStamp" DisplayMemberBinding="{Binding TimeStamp}"/&gt; &lt;GridViewColumn Header=""&gt; &lt;GridViewColumn.CellTemplate&gt; &lt;DataTemplate&gt; &lt;Image Source="{Binding Image}" Width="16" Height="16" VerticalAlignment="Top" HorizontalAlignment="Left"/&gt; &lt;/DataTemplate&gt; &lt;/GridViewColumn.CellTemplate&gt; &lt;/GridViewColumn&gt; &lt;GridViewColumn Header="Level" DisplayMemberBinding="{Binding Level}"/&gt; &lt;GridViewColumn Header="Class" DisplayMemberBinding="{Binding Class}"/&gt; &lt;GridViewColumn Header="Message" DisplayMemberBinding="{Binding Message1}" Width="250" /&gt; &lt;/GridView&gt; &lt;/ListView.View&gt; &lt;/ListView&gt; </code></pre> <p>}</p> <p>Code Behind is :</p> <pre><code>private void ClearListView() { UpdateList update = new UpdateList(UpdateListData); List&lt;LogEntry&gt; searcheddata = new List&lt;LogEntry&gt;(); searcheddata = null; listView1.ItemsSource = null; listView1.Items.Clear(); listView1.Items.Refresh(); pdDispatcher.BeginInvoke(update, DispatcherPriority.Render, searcheddata); } </code></pre> <p>psdispatcher is the dispatcher used to update the UI &amp; searchdata is function to assign datasource to listview</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload