Com.Mikhaellopez.CircularImageView 4.5.1

dotnet add package Com.Mikhaellopez.CircularImageView --version 4.5.1
                    
NuGet\Install-Package Com.Mikhaellopez.CircularImageView -Version 4.5.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Com.Mikhaellopez.CircularImageView" Version="4.5.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Com.Mikhaellopez.CircularImageView" Version="4.5.1" />
                    
Directory.Packages.props
<PackageReference Include="Com.Mikhaellopez.CircularImageView" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Com.Mikhaellopez.CircularImageView --version 4.5.1
                    
#r "nuget: Com.Mikhaellopez.CircularImageView, 4.5.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Com.Mikhaellopez.CircularImageView@4.5.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Com.Mikhaellopez.CircularImageView&version=4.5.1
                    
Install as a Cake Addin
#tool nuget:?package=Com.Mikhaellopez.CircularImageView&version=4.5.1
                    
Install as a Cake Tool

CircularImageView Binding for .NET Android

.NET 10 Android Binding Library for CircularImageView by Mikhael LOPEZ (lopspower).

NuGet License

About

CircularImageView is a fast circular ImageView for Android with optional border and shadow.

  • Original Library: lopspower/CircularImageView
  • Binding Version: 4.3.1
  • Target Framework: net10.0-android
  • Dependencies: Xamarin.AndroidX.AppCompat 1.7.0.5

Installation

NuGet Package Manager

Install-Package Com.Mikhaellopez.CircularImageView

.NET CLI

dotnet add package Com.Mikhaellopez.CircularImageView

PackageReference

<PackageReference Include="Com.Mikhaellopez.CircularImageView" Version="4.5.0" />

Usage

XML Layout (AXML)

<com.mikhaellopez.circularimageview.CircularImageView
    android:id="@+id/circularImageView"
    android:layout_width="120dp"
    android:layout_height="120dp"
    android:src="@drawable/my_image"
    app:civ_border_width="4dp"
    app:civ_border_color="#FF0000"
    app:civ_circle_color="#FFFFFF"
    app:civ_shadow="true"
    app:civ_shadow_radius="10dp"
    app:civ_shadow_color="#8BC34A" />

C# Programmatic Usage

using Com.Mikhaellopez.Circularimageview;
using Android.Graphics;

// In your Activity
var circularImageView = FindViewById<CircularImageView>(Resource.Id.circularImageView);

// Set border
circularImageView.BorderWidth = 10f; // Pixels
circularImageView.BorderColor = Color.Red;

// Set gradient border
circularImageView.BorderColorStart = new Java.Lang.Integer(Color.ParseColor("#FF5722"));
circularImageView.BorderColorEnd = new Java.Lang.Integer(Color.ParseColor("#FFC107"));
circularImageView.BorderColorDirection = GradientDirection.LeftToRight;

// Set circle background color
circularImageView.CircleColor = Color.White;

// Set gradient circle color
circularImageView.CircleColorStart = new Java.Lang.Integer(Color.ParseColor("#E91E63"));
circularImageView.CircleColorEnd = new Java.Lang.Integer(Color.ParseColor("#9C27B0"));
circularImageView.CircleColorDirection = GradientDirection.TopToBottom;

// Configure shadow
circularImageView.ShadowEnable = true;
circularImageView.ShadowRadius = 15f;
circularImageView.ShadowColor = Color.Gray;
circularImageView.ShadowGravity = ShadowGravity.Bottom;

Available Properties

Border Properties

Property Type Description
BorderColor int Solid border color (ARGB format)
BorderColorStart Java.Lang.Integer? Gradient border start color
BorderColorEnd Java.Lang.Integer? Gradient border end color
BorderColorDirection GradientDirection Gradient direction for border
BorderWidth float Border width in pixels

Circle Background Properties

Property Type Description
CircleColor int Solid circle background color
CircleColorStart Java.Lang.Integer? Gradient circle start color
CircleColorEnd Java.Lang.Integer? Gradient circle end color
CircleColorDirection GradientDirection Gradient direction for circle

Shadow Properties

Property Type Description
ShadowEnable bool Enable/disable shadow
ShadowRadius float Shadow blur radius in pixels
ShadowColor int Shadow color (ARGB format)
ShadowGravity ShadowGravity Shadow position

Enums

GradientDirection
  • LeftToRight
  • RightToLeft
  • TopToBottom
  • BottomToTop
ShadowGravity
  • Center
  • Top
  • Bottom
  • Start
  • End

XML Attributes

Attribute Format Description
civ_border boolean Enable border
civ_border_width dimension Border width
civ_border_color color Solid border color
civ_border_color_start color Gradient border start color
civ_border_color_end color Gradient border end color
civ_border_color_direction enum Gradient direction (left_to_right, right_to_left, top_to_bottom, bottom_to_top)
civ_circle_color color Solid circle background color
civ_circle_color_start color Gradient circle start color
civ_circle_color_end color Gradient circle end color
civ_circle_color_direction enum Gradient direction
civ_shadow boolean Enable shadow
civ_shadow_color color Shadow color
civ_shadow_radius dimension Shadow blur radius
civ_shadow_gravity enum Shadow position (center, top, bottom, start, end)

Building from Source

Prerequisites

  • .NET 10 SDK
  • Android SDK
  • Xamarin.AndroidX.AppCompat 1.7.0.5

Build Steps

  1. Clone the repository
  2. Navigate to the binding project directory
  3. Build the project:
dotnet build
  1. The NuGet package will be generated in bin/Debug or bin/Release

Project Structure

CircularImageView.Binding/
├── Jars/
│   └── circularimageview-4.3.1.aar    # Android library
├── Transforms/
│   └── Metadata.xml                    # Binding metadata (currently empty)
├── Resources/
│   └── layout/
│       └── sample_layout.axml          # Sample layout
├── SampleActivity.cs                   # Sample C# code
├── CircularImageView.Binding.csproj   # Project file
└── README.md                           # This file

Complete Example

See SampleActivity.cs and sample_layout.axml for a complete working example.

Important Notes

Color Format

  • Color properties use ARGB integer format (Android color int)
  • Use Color.ParseColor("#RRGGBB") or Color.Argb(a, r, g, b) to create colors
  • For gradient colors, wrap in Java.Lang.Integer: new Java.Lang.Integer(Color.Red)

Namespace Collision

If you have a namespace collision (e.g., Com.Mikhaellopez.CircularImageView.Sample), use an alias:

using CircularImageViewControl = Com.Mikhaellopez.Circularimageview.CircularImageView;

var imageView = FindViewById<CircularImageViewControl>(Resource.Id.circularImageView);

Package Name

  • Java Package: com.mikhaellopez.circularimageview
  • C# Namespace: Com.Mikhaellopez.Circularimageview
  • Class Name: CircularImageView

Build Status

ZERO Errors
ZERO Warnings
✅ Nullable reference types enabled
✅ All properties properly exposed

License

This binding library is licensed under Apache License 2.0 (same as the original library).

Original library: © 2023 Mikhael LOPEZ

Credits

Support

For issues with the binding library, please open an issue on this repository.

For issues with the original library, see the original repository.

Product Compatible and additional computed target framework versions.
.NET net10.0-android36.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.5.1 703 12/2/2025
4.5.0 689 12/2/2025

.Net 10 version