Introduction
Xamarin is a platform to develop cross-platform and multi-platform apps (for example Windows phone, Android, iOS). The code sharing concept is used in the Xamarin platform, and it's available in Visual Studio also.
Date picker is used to get the system date and pick your desired date.
Xamarin is a platform to develop cross-platform and multi-platform apps (for example Windows phone, Android, iOS). The code sharing concept is used in the Xamarin platform, and it's available in Visual Studio also.
Date picker is used to get the system date and pick your desired date.
Prerequisites
- Visual Studio 2015 Update 3
The steps given below need to be followed in order to pick a date in Android app, using Visual Studio 2015.
Step 1
Click File--> select New--> select Project. the project needs to be clicked after opening all the types of projects in Visual Studio
or click (Ctrl+Shift+N).
Step 1
Click File--> select New--> select Project. the project needs to be clicked after opening all the types of projects in Visual Studio
or click (Ctrl+Shift+N).
Step 2
Afterwards, open the New Project, select Installed-->Templates-->Visual C#-->Android-->choose the Blank app (Android).
Now, give your Android app a name (Ex:sample) and give the path of your project. Afterwards, click OK.
Afterwards, open the New Project, select Installed-->Templates-->Visual C#-->Android-->choose the Blank app (Android).
Now, give your Android app a name (Ex:sample) and give the path of your project. Afterwards, click OK.
Step 3
Now, go to Solution Explorer. In Solution Explorer, get the all the files and sources in your project.
Now, select Resource-->Layout--> double click to open main.axml page. You need to select the source to write XAML code.
If you want to design, choose the designer Window and you can design your app.
Now, go to Solution Explorer. In Solution Explorer, get the all the files and sources in your project.
Now, select Resource-->Layout--> double click to open main.axml page. You need to select the source to write XAML code.
If you want to design, choose the designer Window and you can design your app.
Step 4
After opening main.axml, file will open the main page designer. In this page, you can design the page, based on which type you want.
Now, delete the Default hello world button.
Go to the source panel and you will see the button coding. You need to delete it.
Afterwards, delete XAML code. Now, delete C# button action code.
Go to MainActivity.cs page and you need to delete the button code.
Step 5
Now, go to the toolbox Window and in the toolbox Window, get all the types of the tools and control. You need to go to the toolbox Window. Now, scroll down and you will see all the tools and controls.
You need to drag and drop the button.
After opening main.axml, file will open the main page designer. In this page, you can design the page, based on which type you want.
Now, delete the Default hello world button.
Go to the source panel and you will see the button coding. You need to delete it.
Afterwards, delete XAML code. Now, delete C# button action code.
Go to MainActivity.cs page and you need to delete the button code.
Step 5
Now, go to the toolbox Window and in the toolbox Window, get all the types of the tools and control. You need to go to the toolbox Window. Now, scroll down and you will see all the tools and controls.
You need to drag and drop the button.

Step 6
You need to drag and drop the TextView.
Step 7
Now, go to the properties Window. You need to edit the button text value and Id value (Ex: android:text="Pick Date" android:id="@+id/date_select_button").
Step 8
Also, edit the TextView properties or note the values in main.axml page source panel.

Also, edit the TextView properties or note the values in main.axml page source panel.

Main.axml
- <Button
- android:text="Pick Date"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:id="@+id/date_select_button" />
- <TextView
- android:text=""
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:id="@+id/date_display" />



krishna vamsiPosted Jul 28, 2018, 5:42 AM
Selected date was not displaying in the textview
Shamim UddinPosted Oct 16, 2016, 5:27 AM
Nice