Usage of VisualStateManager to Define User Interface in Silverlight 3
page 1 of 6
Published: 23 Jun 2009
Abstract
In this article, Sergey describes the role of VisualStateManager in defining user interfaces using Silverlight 3. He begins with a short introduction of the relevant concepts and then examines the basic anatomy of the VisualStateManager and the definition of states with the help of source code examples and supported figures. The whole concept simpler to use than triggers.
by Sergey Zwezdin
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 37277/ 78

Introduction

A possibility to describe declaratively a user interface based on XAML has become the reason to think about the building of the user interfaces in a different way. This approach has allowed distribution work between a programmer and designer. It has defined a new branch of a user interfaces development industry.

As is known, user interfaces are based on the set of templates (ControlTemplate) for control elements. It is true for both WPF and Silverlight. Usually templates are a kind of layout, containing elements for a user interface definition. Triggers are usually used when there is a need to define some appearance changes depending on any condition. For these purposes a property or event is used to trace the moment of a control element state changing.

This approach is good in case of simple logic. However, it is easy to understand that logic of triggers will be really confused in cases where there are a multiple set of conditions or it is necessary to supervise some conditions simultaneously. In some cases creation, debugging and support for such applications can become a big hell for a developer or designer.

To resolve this conceptual problem there is a suggestion to have another look at user interfaces development. It is proposed to define a set of conditions based on representation of definition for a control element instead of triggers and behavioral representation. In this case every control element will be in some state, and appearance depends on the current state of a control element.

The definition of control elements appearance that is based on states is considered in the article where you can read about the convenient way to set visual representation of control elements.


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-2017 ASPAlliance.com  |  Page Processed at 2017-10-22 3:19:59 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search