Silverlight topic (5)-Silverlight 2 RC0 update content

Source: Internet
Author: User
Document directory
  • New control:
  • Update template and style:
  • MessageBox support:
  • Help:

Today, Microsoft finally released the first release candidate0 for Silverlight 2.

Although it is not the official version, it still brings some new controls and functions to developers.

New control:

It includes the following three items:

Progressbar

Passwordbox

ComboBox

In addition, the tooltip control vs2008 can be identified (vs2008 cannot be intelligently recognized at beta2)

Scottgu mentioned in his blog that many controls will be added to the next a few months.

(We don't know how much it is. We are looking forward to putting it together)

Below is the code for adding three new controls with RC0.

<Usercontrol X: class = "releasetest. Page"
Xmlns = "http://schemas.microsoft.com/winfx/2006/xaml/presentation"
Xmlns: x = "http://schemas.microsoft.com/winfx/2006/xaml"
Width = "400" Height = "300" xmlns: VSM = "CLR-namespace: system. Windows; Assembly = system. Windows">
<Stackpanel>
<Progressbar X: Name = "PB" width = "200" Height = "20" value = "20" Maximum = "100" margin = "5"/>
<ComboBox width = "200" margin = "5">
<Comboboxitem content = "Silverlight 1"/>
<Comboboxitem content = "Silverlight 2 beta1"/>
<Comboboxitem content = "Silverlight 2 beta2"/>
<Comboboxitem content = "Silverlight 2 RC0"/>
</ComboBox>
<Passwordbox X: Name = "password1" Password = "Silverlight" width = "200" margin = "5"/>
</Stackpanel>
</Usercontrol>

The operation is as follows:

You can see that Microsoft changed the default skin color to the sky blue.

This is also an update of RC0, as is the default load icon.

It seems that the artist here prefers this color.

The default color scheme is similar to that of the Silverlight 2 official version.

If you don't like it, you can use templates or styles to customize them.

Update template and style:

Visual state model (VSM is used to control the appearance of controls in different states, such as Mouseover and mouseleave)

This version changes the parameter names and usage of this part.

So if your previous versions Use templates and styles

We 'd better remove them first and then add them with new parameter settings using blend.

Shows how to use Blend:

Change the previous transition state interval attribute duration to generatedduration.

Principles and Practices of VSM

MessageBox support:

This version of Silverlight finally introduced a feature that everyone dreamed of: MessageBox

Messageboxresult result = MessageBox. Show ("Change button's content? "," Change content ", messageboxbutton. okcancel );
If (result = messageboxresult. OK)
{
This. BTN. content = "thanks! ";
}

The figure is as follows:

 

Click OK.

 

Help:

The RC0 help is completely different from the previous version.

Previously, CHM files were provided for download (currently the CHM of RC0 has not been released)

Now it is integrated into msdn. Please pay attention to this when looking for help.

The integration process is illustrated as follows:

1. Open vs2008 and select help> index.

 

2. Select filtered by AS (unfiltered)

Look for collection manager

Press OK and select the help in the collection manager directory as follows:

3. Check Microsoft Silverlight 2 SDK documentation and click the update VSCC button below.

(If the update VSCC button is grayed out and Microsoft Silverlight 2 SDK documentation is selected by default, the help has been installed)

4. Disable the msdn help and vs2008, and restart vs2008 (it will be updated for a period of time, about 3 minutes ~ Step 2

Enter Silverlight in look for and the following results will appear:

Congratulations, Your help has been installed successfully.

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.