Let’s start,

Step 1 - Open Visual Studio, New Project, Templates, Visual C#, Android, Blank App, Select Blank App. Then give Project Name and Project Location.

Step 2

Next go to Solution Explorer-> Project Name-> References then Right Click to Manage Nuget Packages then open new Dialog box. This dialog box to search the Refractored.Controls.Circleimageview then Install the Package.



Step 3

Then Open Solution Explorer-> Project Name->Resources-> drawable then Right Click to Add->Existing Item... then add any one image.



Step 4

Next Open Solution Explorer-> Project Name->Resources->layout->Main.axml Click Open Design View.

XMLCode:

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3. xmlns:app="http://schemas.android.com/apk/res-auto"
  4. android:layout_width="match_parent"
  5. android:layout_height="210dp"
  6. android:padding="16dp"
  7. android:orientation="vertical"
  8. android:background="@android:color/holo_blue_dark">
  9. <refractored.controls.CircleImageView
  10. android:paddingTop="16dp"
  11. android:layout_width="150dp"
  12. android:layout_height="141.5dp"
  13. android:id="@+id/navheader_userimage"
  14. android:src="@drawable/Rose"
  15. app:civ_border_width="2dp"
  16. app:civ_border_color="#000000" />
  17. </LinearLayout>

Design View

Step 5: Press F5 or Build and Run the Application.Image will showing Circle View.

Finally, we have successfully created Xamarin Android Circle Image Application.