(X) Hide this
    • Login
    • Join
      • Say No Bots Generate New Image
        By clicking 'Register' you accept the terms of use .
        Login with Facebook

Throttling Silverlight Mouse Events to Keep the UI Responsive

(0 votes)
0 comments   /   posted by Silverlight Show on Jun 15, 2010
Tags:   mouse-events , events , wpf , colin-eberhardt
Colin Eberhardt describes a technique for ‘throttling’ mouse events to ensure that each time an event occurs, the UI has the opportunity to render.

The visual tree of a Silverlight / WPF uses the retained mode graphics  rendering style, where the tree forms a model of the graphics which are rendered to the screen. Any changes that are made to the visual tree by adding / removing objects or changing the properties of an object within the tree, are automatically rendered to your computer screen at some point in the future.

This graphics style makes the development of complex graphics far easier than with the immediate mode counterpart. You add objects, make changes to them, and these changes are reflect on the screen by some background magic. This works just fine most of the time, however, if you continually make changes to the visual tree, without yielding, the ‘process’ which updates the UI does not have the opportunity to run, and your UI is starved.


Comments

No comments

Add Comment

Login to comment:
  *      *       
Login with Facebook

Our News on Twitter