HELLO FRIENDS!!
In this blog we will start with a basic app (auto-increment a number on click event) for Android and Windows. For simplification a video is attached at the end of this tutorial.
Before starting with the coding part make sure you have installed Xamarin and all the required files for Android development. For installation of the files refer Chap.1 - Installation and once you are done with installing all the required files you are ready to go.
Lets START !!
> Open Visual Studio.
> Click File -> New -> Project -> Android -> Blank App
> Right Click Solution in Solution Explorer -> Add Project ->Windows ->Universal/Windows phone
Now application files are created for both Android and Windows.
Android :
> Click Resources -> layout -> Main.axml
> Click Design
You will get the following window :
> Click Source
You will get the following window :
> Double Click MainActivity.cs file from Solution Explorer to open the file.
Write the following code :
You are almost done with Android part.
Now for building and debugging Android app select Startup App as your Android app. Select the emulator on which you want to test the app and hit the button RUN.
WINDOWS PHONE :
> Click MainPage.xaml file
You will get the following window :
> Double Click on the button you will be navigated to the MainPage.xaml.cs file with button_click() method auto generated.
> Write the following code inside button_Click () method :
You are almost done with Windows part.
Now for building and debugging Windows Phone app select Startup App as your Windows Phone app. Select the emulator on which you want to test the app and hit the button RUN.
VIDEO TUTORIAL OF CROSS PLATFORM APP DEVELOPMENT (AUTO INCREMENT NUMBER ON BUTTON CLICK) :
In this blog we will start with a basic app (auto-increment a number on click event) for Android and Windows. For simplification a video is attached at the end of this tutorial.
Before starting with the coding part make sure you have installed Xamarin and all the required files for Android development. For installation of the files refer Chap.1 - Installation and once you are done with installing all the required files you are ready to go.
Lets START !!
> Open Visual Studio.
> Click File -> New -> Project -> Android -> Blank App
> Right Click Solution in Solution Explorer -> Add Project ->Windows ->Universal/Windows phone
Now application files are created for both Android and Windows.
Android :
> Click Resources -> layout -> Main.axml
> Click Design
You will get the following window :
> Click Source
You will get the following window :
> Double Click MainActivity.cs file from Solution Explorer to open the file.
Write the following code :
You are almost done with Android part.
Now for building and debugging Android app select Startup App as your Android app. Select the emulator on which you want to test the app and hit the button RUN.
WINDOWS PHONE :
> Click MainPage.xaml file
You will get the following window :
> Double Click on the button you will be navigated to the MainPage.xaml.cs file with button_click() method auto generated.
> Write the following code inside button_Click () method :
You are almost done with Windows part.
Now for building and debugging Windows Phone app select Startup App as your Windows Phone app. Select the emulator on which you want to test the app and hit the button RUN.
VIDEO TUTORIAL OF CROSS PLATFORM APP DEVELOPMENT (AUTO INCREMENT NUMBER ON BUTTON CLICK) :
Click to view :