Expression Blend Example Chinese tutorial (11)

Source: Internet
Author: User
Tags silverlight

Expression Blend Example Chinese tutorial (11)-Visual Manager QuickStart Visual State Manager (VSM)

Visual state Manager, also referred to as the Visual Status Manager (VSM), is a concept introduced in Silverlight 2. By using VSM, developers and designers can easily change the visual effects of project controls, where VSM is primarily used to create custom controls and control templates. In order to be able to create a brilliant Silverlight project, learning to master VSM is very necessary. This article describes the QuickStart knowledge of VSM and how VSM is used in blend.

Before learning VSM, first of all, understand the following basic concepts:

As mentioned earlier, the VSM visual manager is the visual effect of a user controlling a project control, and Silverlight encapsulates its appearance independently while defining the control, and separately encapsulates the logical part of the control, in other words, when a developer modifies a control's appearance, Does not affect the logical part of the control. This shows that the Silverlight control is made up of two major parts, Parts (part) and States model (state module).

1. Parts (parts), mainly responsible for the appearance of the control display. Most of the controls in Silverlight are grouped by multiple child controls, which are partly parts. Note that here we say that most of the controls are grouped by child controls, not all controls have children parts, so it is also possible that the control does not have a parts (part) part. There is a detailed description of the control in MSDN, and the composition of the specific control needs to be queried for MSDN.

Here we take a look at the example below, we use ChildWindow as an example of an explanation:

In a ChildWindow, there are 6 parts (parts), respectively

Chrome, child window frame

CloseButton, the Close button on the head of the child window

ContentPresenter, the main content part of the child window

Contentroot, is the container that hosts the chrome and Cotentpresenter.

Overlay, when the child window is open, the part that is overwritten on the parent window

Root, parent control

From the above can be seen, a childwindow is composed of 6 parts, and modify the 6 parts appearance style, nature also changed the appearance of ChildWindow, also produced a different visual effects.

2. Visual States Model (visual state module), in order to understand the convenience, can be subdivided into three parts to understand, visual States (visual State), visual States Groups (visual State group) and visual Transitions (visual transition conversion)

Visual States (visual state) is the display state of the accusation piece in a particular case. Simply put, the effect that the control displays in different situations. For example, for ChildWindow, there are only two visual States (visual States), one is to display child windows, and the other is to hide child windows. Therefore, the visualstates definition for ChildWindow in MSDN is only:

Closed, child window hidden

Open, child window display

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.