Windows Phone Practical Tutorial: Adding Design-time data to a program using blend

Source: Internet
Author: User

Blend has been following the developers ' comments since the day he was born:

Have vs also use blend to do what, direct code code is good.

Blend will generate a heap of garbage useless code, very uncomfortable.

For this kind of I will only judge in the heart, when you do not really know the same thing, it is very unfair to put labels on this thing.

As a programmer first to understand the importance of time and efficiency, but also understand the various performance tools, blend is one of them, if you still think that learning how to use blend is a waste of time,

So congratulations, the following article can ignore the:-)

"What is described in this article"

Use blend to add design-time data to your program.

"The scenario that this article applies"

Many applications are determined by their own nature, their data source is remote network, so it is very inconvenient to adjust the UI, most of the process is to tune the UI:

1, adjust the UI layout

2. Run the program

3. Waiting for data to load

4, the data after loading to see if there are UI issues, if there are goto 1

So inefficient, the method described in this article can adjust the process to:

1. Add design-time data source

2, adjust the UI layout

3, adjust the UI layout

4, adjust the UI layout

Eliminates the on-line debugging, enhances the efficiency.

Body

First, the realization of ideas

The blend itself provides the Sampledata feature, which automatically generates a Sampledata file based on the definition of model and provides D:datacontext and d:designdata to specify design-time DataContext. The combination of the two can achieve the effect mentioned earlier.

Ii. Specific steps

1, we first create the program model and the main page of the Mainpageviewmodel

Model:

ViewModel:

Related Article

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.