How To Use Some UI Controls In Xamarin Forms

Today, I will teach you how to make simple controls with the help of the Xamarin forms. These are the controls I will teach you today, as shown in the figure, given below:

figure

Let's start. We open a new project from the file and then the Window opens, as shown in the figure. We select the Blank XAML App (Xamarin Forms Portable). Why do we choose this option? I explained it in my previous post. Now, we write the name of the project and click OK.

project

Now, lets start with the progress bar. This code is as simple as the date and the set of the time I taught in my previous video. Here is the code, which I do in the stacklayout, as given in the figure, given below.

code

Now, we run this small app and after it runs, what will we get?

output

In the Red circle, we see the progress. My next control is Activityindicator, which we use to see all the time, while loading our page or any other loading.  Let's start. First, we write the code, given below.

code

The activity indicator is White. Thus, I make some property as visible. This is running in your phone, as you can see in the figure, given below, in my mobile.

output

This bar is usually seen in the loading of the app. This is often used in our app. I hope you remember, if you see it anywhere. Let's go to the next control, which is a fancy button. Yes, I know, I make a button earlier, but if we give some properties, then how will it look? Let's see in the figure, which is a code of the button, where I add font, color and attributes.

code

Thus, this is how it will appear in the mobile, which can be seen in the figure, given below:

output

You can see that the button is looking good and it is very easy to make this button. You have to practice. Just comment, if you like.