Introduction
This article demonstrates how to bring wifi connectivity to Xamarin.Forms.
Let's start.
Step 1
Open Visual Studio and go to New Project >> Installed >> Visual C# >> Cross-Platform.
Select Cross-Platform app, then give your project a Name and Location.


Step 2
Add the Following NuGet Packages to Your project.
- Xam.Plugin.Connectivity
Go to Solution Explorer and select your solution. Right-Click and select "Manage NuGet Packages for Solution".
Now, Select the following NuGet Package and select your project to install it.
Step 3
Next, add an image to Open Solution Explorer >> Project Name.Android >> Resources >> Right Click the drawable.
Next, a dialogue box will open. Choose image location and add images.

Step 4
Open Solution Explorer >> Project Name >> Mainpage.xaml. Open the Design View of this page.
The Code is given below.
We are Create a Lable and Image inside the StackLayout and image name is copy and paste the image source "Untitled1".
Xaml Code
- <ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
- xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
- xmlns:local="clr-namespace:WifiConnectivity"
- x:Class="WifiConnectivity.MainPage">
- <StackLayout HorizontalOptions="Center" VerticalOptions="Center">
- <Label Text="Connect Wifi" HorizontalOptions="CenterAndExpand" VerticalOptions="CenterAndExpand" FontSize="Large"/>
- <Image Source="Untitled1.jpg" HorizontalOptions="Center" VerticalOptions="Center" HeightRequest="80" WidthRequest="80"/>
- </StackLayout>
- </ContentPage>
Step 5
Open Solution Explorer >> Project Name >> Right Click >> New Item.
The dialogue box will open. Now, add the XAML page

Step 6
Open Solution Explorer >> Project Name >> page1.xaml. Open the Design View of this page.

The code is given below
Xaml Code


Sagar Pandurang KapPosted Mar 12, 2018, 2:11 AM
Awesome stuff.Thanks...
Logesh PalaniPosted Mar 10, 2018, 8:06 PM
Nice dude :). ,,, Keep sharing
Vidyadharran GPosted Mar 9, 2018, 11:29 AM
nice thambi :)...keep sharing