Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6743881
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T12:00:57+00:00 2026-05-26T12:00:57+00:00

I have a list of items in ListView and I need something like AfterSelectionChanged

  • 0

I have a list of items in ListView and I need something like AfterSelectionChanged event. Now I am subscribed to ItemSelectionChanged but it is triggered N times if I press Ctrl+A in list with N items. But I need to be notified only one time after all items would be selected.

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T12:00:58+00:00Added an answer on May 26, 2026 at 12:00 pm

    You can make your own by delaying a method call until all the ItemSelectionChanged events stopped firing. Which is very cleanly done by Control.BeginInvoke(). Make it look similar to this:

        List<int> afterSelect = new List<int>();
    
        private void listView1_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e) {            
            if (afterSelect.Count == 0) this.BeginInvoke(new Action(() => listView1_AfterSelectionChanged()));
            afterSelect.Add(e.ItemIndex);
        }
    
        private void listView1_AfterSelectionChanged() {
            // Use afterSelect
            //..
            afterSelect.Clear();
        }
    

    You can use a bool flag instead of the List<> if you don’t need to keep track of which items changed.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a list of items that are displayed using a ListView from a
I have a ListView with a custom layout for the rows (list items) and
So I have binded a List to a ListView where the List has items
I have the following ListView with a custom list item: I would like to
I have a list of items displayed as a ListBox. <ListView ItemsSource={Binding ListOfSomeItems}> <ListView.View>
I have a ListView. I need to add items on listView on a condition(true).
I have a ListView of items that need to be checkable/uncheckable. I have set
So I have a custom ListView object. The list items have two textviews stacked
I have a ListView bound to a Generic List collection. I need to be
I have achieved something similar for particular items within my ListView in this question.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.