WEB开发网
开发学院图形图像Flash Silverlight and the VisualStateManager 阅读

Silverlight and the VisualStateManager

 2008-10-24 11:46:25 来源:WEB开发网   
核心提示: I’m selecting the BackgroundGradient element and then changing the color within the Properties palette.Let’s change it to red.There i

Silverlight and the VisualStateManager

I’m selecting the BackgroundGradient element and then changing the color within the Properties palette. Let’s change it to red. There is no need for me to pay attention to any timeline stop points or anything, just concentrate on what I want the final Button to look like, position, etc. in this state:

Silverlight and the VisualStateManager

That’s it. MouseOver will now represent my new state. I didn’t have to create any new StoryBoard elements or anything. This is in part where VSM does some magic. You see, the VSM engine bascially knows the beginning end states between any given transition (i.e., Normal –> MouseOver). The VSM engine automatically handles the transition for us. Think of it as creating a dynamic StoryBoard on the fly and executing it. If we run the application and mouse over the Button, it changes to our state.

Notice the time in the state palette for a given state:

Silverlight and the VisualStateManager

This controls the duration of the transition TO that final state.

上一页  1 2 3 4  下一页

Tags:Silverlight and the

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接