Tech Tock

Time is of the essence.

Dispatcher.BeginInvoke: UI Duct Tape

image It’s a standing joke on my current Silverlight project that when something isn’t working, just try Dispatcher.BeginInvoke.

Its funny because its true.  When there’s property setting or UI resizing or several other common UI related problems, putting the next statement on the Dispatcher to let an operation complete first is just the trick.  Handy as Duct Tape.  Case in point, the focus at startup issue.


May 13, 2010 - Posted by | Uncategorized | ,

1 Comment »

  1. […] looks like SetFocus is being called asynchronously as UI Duct Type to workaround another issue where focus can not be set until the control is […]

    Pingback by A single line stack trace | August 13, 2012 | Reply

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: