Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Example Analysis of Program status and Progress in Xamarin.Forms

2025-03-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)05/31 Report--

Editor to share with you the Xamarin.Forms program status and progress of the example analysis, I believe that most people do not know much about it, so share this article for your reference, I hope you will learn a lot after reading this article, let's go to understand it!

Program status and Progress in Xamarin.Forms

In Xamarin.Forms, two controls are provided to indicate the status and progress of the program. They are activity indicators and progress bars, respectively. Among them, the activity indicator is used when the program is waiting for a long time to complete, that is, in uncertain operations, such as loading network videos, web pages, images, etc., while the progress bar is used to determine the progress, such as downloading images, videos, etc. This chapter explains these two controls.

Activity indicator ActivityIndicator

ActivityIndicator, known as an activity indicator, provides users with simple feedback indicating that the program is running and does not provide specific progress information. This section explains how to use the activity indicator.

Build activity indicator

To build an activity indicator in XAML, you need to use the ActivityIndicator tag, whose syntax is as follows:

Or:

Display and hiding of activity indicator

After building the activity indicator, it does not display directly in the interface like slider controls, step controls, text box controls, and so on, because the activity indicator is hidden at this time. If you want to control the display and hiding of indicators, you need to use the IsRunning property defined by ActivityIndicator, which can be used to indicate whether the activity indicator is running, in the following syntax form:

Where boolValue is a Boolean value, when this value is true, the activity indicator automatically displays and runs; when this value is false, the activity indicator is automatically hidden.

[example 12-1:ActivityIndicatorIsRunningOne] the activity indicator is displayed below. The code is as follows:

When you run the program at this time, you will see the effect shown in figure 12.1-12.3.

Figure 12.1 the running effect of Android figure 12.2 the running effect of iOS figure 12.3 the running effect of Windows Phone

The above is all the contents of the article "sample Analysis of Program status and Progress in Xamarin.Forms". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report