Autorefresh CollectionViewSource in Silverlight


Autorefresh CollectionViewSource in SilverlightSilverlight

by Roberto on February 13, 2010 with 0 comment

As we discuss in an earlier post one of the drawbacks of the CollectionViewSource is that whenever the source collection items are modified the filter does not refresh automatically.

In order to solve this issue we can create our own CollectionViewSource and add it this capability. In fact it’s very straight forward. We’ll have to subscribe to the items’ propertyChanged event and then refresh the view!

continue reading ...

Silverlight behaviour: Drag and drop listbox items


Silverlight behaviour: Drag and drop listbox itemsBehaviours, Silverlight

by Roberto on February 13, 2010 with 5 comments

With this new behaviour applied to any panel you will be able to drag the items of any child listbox and drop them where ever you want. In the example you will see that the items get drop into another listbox but this can be easily customized.

This behaviour exposes a single event you have to suscribe: onMouseReleased.

continue reading ...

Silverlight behaviour: Enabling double click


Silverlight behaviour: Enabling double clickBehaviours, Silverlight

by Roberto on February 13, 2010 with 0 comment

I made this behaviour just to enable double click events in Silverlight. It’s easy to work with this. Just remember to handle the click and double click event of the behaviour and avoid handling the control mouseButtonUp event, as it will make that the behaviour never handles its events.

Install Microsoft Silverlight

Download Demo

Note that this example takes the button as pressed when the user releases de mouse button.

continue reading ...

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.