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

  • SEARCH
  • Home
  • 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 3943598
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T00:48:04+00:00 2026-05-20T00:48:04+00:00

UI tree: listbox with the april 2010 toolkit’s listboxdragdroptarget listbox item template includes a

  • 0

UI tree:

  • listbox with the april 2010 toolkit’s listboxdragdroptarget
  • listbox item template includes a control that has a a couple of buttons
  • the click handler in question is in one of those buttons (and therefore part of the actual listboxitem in the UI, so a potential drag-drop operation)
  • the overall listbox item should be able to drag (to rearrange within the listbox, or move to another listbox), but the goal is to keep the click handlers on these buttons from triggering a drag

Currently the click handler on one of the buttons (see above) appears to take long enough (it does a bunch of updates to the viewmodel, which cause various other UI changes, so it needs to be on the UI thread AFAICT) that it very often causes the drag event to start.

The first thought on getting this code out of the click handler is to create a BackgroundWorker with no DoWork and put it all in the RunWorkerCompleted. However, that feels like both an abuse of BackgroundWorker and kind of heavyweight. The effect I want is akin to just PostThreadMessage on the same thread (the UI thread) but I’m not seeing anything jump out at me for how to do so quickly.

I could certainly queue up something with the threadpool or even a new thread and then have it marshal it back over to the UI thread, but again that seems like quite the abuse.

  • 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-20T00:48:04+00:00Added an answer on May 20, 2026 at 12:48 am

    I think Dispatcher.BeginInvoke with a low DispatcherPriority behaves almost like PostThreadMessage.

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

Sidebar

Related Questions

I want my tree view control to show an item with a folder icon
I have a tree structure in memory that I would like to render in
I have tree control object created using CTreeCtrl MFC class. The tree control needs
I want to verify that the items in my ListBox are displayed correctly in
I am building a small Windows Phone application which has a databound ListBox as
I would like to create a visual effect when an item in a listbox
I am building an indexer application based on a suffix tree, that enables me
binary tree, where each node has at most two child nodes, child nodes may
Given a tree, how to find the centre node in the tree so that
I have a tree ful with data that are draggable (& droppable). It all

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.