Xamarin XAML Language tutorial xamarin.forms changing the active indicator color

Source: Internet
Author: User

Xamarin XAML Language tutorial xamarin.forms changing the active indicator color

In Figure 12.10~12.12 we will see that the color of the active indicator is different under each platform. The active indicator of Android is dark pink by default, the activity indicator of iOS is gray, and the activity indicator of Windows phone is blue. If the developer wants to unify the color of the activity indicator under each platform, you can use the color attribute defined by Activityindicator, which has the following syntax:

<activityindicator color= "Activityindicatorcolor"/>

Where Activityindicatorcolor is used to specify the color of the activity indicator, which can be a static field in color or a color name with or without an alpha channel.

Example 12-4:activityindicatorisrunningone the following will be based on project Activityindicatorisrunningone, setting the color of the activity indicator to green. The code is as follows:

<activityindicator isrunning= "True"

color= "Green"

verticaloptions= "Center"/>

When you run the program, you see the effect shown in 12.16~12.18

Figure 12.16 Android Run effect diagram 12.17 iOS run effect diagram 12.18 Windows phone Run effect

Note: The Color property is not valid in Windows Phone.

Xamarin XAML Language tutorial xamarin.forms changing the active indicator color

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.