Silverlight Feeds - All your Silverlight feeds in one place.

Sponsors

Thursday, December 31, 2009

Silverlight 4.0 :LayoutStates

by Corrado Cavalli via Corrado's BLogs on 12/31/2009 8:20:23 AM

Un altra interessante novità di Silverlight 4.0 è il fatto che il default template di ListBox/ComboBoxItem include tre nuovi stati: BeforeLoaded,Loaded e Unloaded.
Agendo su questi stati è possibile modificare lo stato dell’item quando questo viene aggiunto e/o rimosso dalla lista, con Blend4 gestire questi stati è semplicissimo:

Aggiungiamo una listbox (o combobox) ad una pagina ed editiamone il relativo ItemContainerStyle:

image

A questo punto andiamo ad agire sugli stati indicati in precedenza:

image

in questo caso agiremo semplicemente sulla proprietà Opacity impostandola a zero negli stati BeforeLoaded e Unloaded:

image

Modifichiamo il tempo di transizione portandolo a 1 secondo:

image

Fatto questo, ogni volta che un item verrà aggiunto o rimosso dalla lista il tutto avverrà con un gradevole effetto fading.

Technorati Tags: ,
email it!bookmark it!digg it!

Original Post: Silverlight 4.0 :LayoutStates

Subscribe

New Feed

Product Spotlight

Recently Updated Sources

Legal Note

The content of the postings is owned by the respective author. Silverlight Feeds is not responsible for the contents of the postings. This site is automatically generated and cannot be reviewed for abusive content. If you find abusive content on Silverlight Feeds, please contact us. Designated trademarks and brands are the property of their respective owners. All rights reserved.

Advertise with us