Silverlight Instance Tutorial

Source: Internet
Author: User

Friends who are familiar with Silverlight should know that Silverlight from version 1.0 to today's version 4.0 is becoming more functional, and from the following figure we can see that a transformation of the Silverlight application model From JavaScript to now trusted applications, we have witnessed the ups and downs of the evolution process, although there are still deficiencies, but with more developer support and help, Silverlight will certainly be better and stronger.

In the previous few, we introduced the Silverlight out of browser application Development Foundation with a simple example. To prepare for the next example, in this article, we will add some Silverlight out of browser application development knowledge points,

1. Review Silverlight out of browser access to local directory APIs;

2. Learn Silverlight out of browser application debug debug;

3. Learn the message Notification window API for Silverlight out of browser;

Review Silverlight out of browser access to local directory APIs, remember in the previous article we have described that Silverlight provides off-the-shelf APIs that allow applications to access my in OOB mode ... Series directory, API invocation method is very simple, and OOB mode file access, application can support System.IO reference space in the action class, such as file class, Directory class, Environment class, and so on.

1 private void AddMusicToList()
2          {
3              var path =  Environment.GetFolderPath(Environment.SpecialFolder.MyMusic);
4               lsMyMusics.Items.Clear();
5               DirectoryInfo myDirectory = new DirectoryInfo (path);
6              foreach (FileInfo file in  myDirectory.EnumerateFiles())
7              {
8                   lsMyMusics.Items.Add(file);
9               }
10          }

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.