Usage of VisualStateManager to Define User Interface in Silverlight 3
page 2 of 6
by Sergey Zwezdin
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 42330/ 76

The Concept

The developer usually does not think about a control element representation when it is underway. More important is to program logic of a control element. External representation is set later. As a general rule, a template (ControlTemplate) is formed to that end. However, any control element (even the simplest one) has a set of conditions that allows it to look differ. These conditions are named states. For example, an ordinary button can have several states - normal, pressed, hovered, etc. It is more logical when business logic of a control element informs about the current state, and the control element is in the process of representation changing. Work of VisualStateManager object is based on this approach.

VisualStateManager object allows determination of a state of a current control element. Usually the level of business logic does it within a control element. A control element internal event can be the reason (for example, press a button of a mouse or input text). It is necessary to attach VisualStateManager object to an internal control element within a template (ControlTemplate) to set representation. So, VisualStateManager object within a template will trace a current state automatically and execute transformations of user interface if there is need.


View Entire Article

User Comments

Title: Nice article   
Name: bala
Date: 2010-12-31 3:19:59 AM
Comment:
nice article, inspired to do






Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2019 ASPAlliance.com  |  Page Processed at 2019-04-24 6:05:19 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search