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