Uncertain progress bar created in Windows Phone

Source: Internet
Author: User
ArticleDirectory
    • Main Code

The following is from msdn: http://msdn.microsoft.com/zh-cn/library/windowsphone/develop/gg442303 (V = vs.105). aspx

Below Code Set the isindeterminate flag True So when you run this example, the progress bar is displayed immediately. To add a progress bar in the XAML code, use the following code: XAML <progressbar isindeterminate =" True "X: Name =" Customindeterminateprogressbar "Style =" {Staticresource customindeterminateprogressbar} "/> Add the above Code to the <grid> tag of mainpage. XAML. The contentpanel of this tag is X: Name. When using a progress bar in your application, make sure that the progress bar is set to isindeterminate = False When the progress bar is not used, the visibility attribute is set to collapsed. For demonstration, this example sets Program To complete the operation. Alternatively, if you do not want to set or switch these values, you can set to use data binding on isindeterminate. For the purpose of this example (using a button to switch values), add the following code to mainpage. XAML and put it directly below the progressbar code in the previous step: XAML <button content =" Toggle progressbar "Height =" 72 "Horizontalalignment =" Left "Margin =" 81,450, 0, 0 "Name =" Togglebutton "Verticalalignment =" Top "Width =" 300 "Click =" Togglebutton_click "/> In the click handler, use the following code to switch values: C # customindeterminateprogressbar. isindeterminate =! (Customindeterminateprogressbar. isindeterminate ); If (Customindeterminateprogressbar. Visibility = visibility. Collapsed) {customindeterminateprogressbar. Visibility = visibility. visible ;} Else {Customindeterminateprogressbar. Visibility = visibility. collapsed ;}

 

Main Code

: Start isindeterminate = "true" and set the progress control to display status

 
Customindeterminateprogressbar. Visibility = visibility. visible;

 

End with isindeterminate = "false" and set the progress control to hidden.

 
Customindeterminateprogressbar. Visibility = visibility. collapsed;
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.