Plugin.CurlEffect
1.0.4
See the version list below for details.
dotnet add package Plugin.CurlEffect --version 1.0.4
NuGet\Install-Package Plugin.CurlEffect -Version 1.0.4
<PackageReference Include="Plugin.CurlEffect" Version="1.0.4" />
<PackageVersion Include="Plugin.CurlEffect" Version="1.0.4" />
<PackageReference Include="Plugin.CurlEffect" />
paket add Plugin.CurlEffect --version 1.0.4
#r "nuget: Plugin.CurlEffect, 1.0.4"
#:package Plugin.CurlEffect@1.0.4
#addin nuget:?package=Plugin.CurlEffect&version=1.0.4
#tool nuget:?package=Plugin.CurlEffect&version=1.0.4
CurlEffect
A bindable, book-style page-curl control for .NET MAUI, rendered with SkiaSharp. Drag from any
edge to turn pages, or drive it programmatically with sync / async / ICommand APIs.
Install
dotnet add package Plugin.CurlEffect
Register the plugin in your MauiProgram (this also wires up SkiaSharp):
using CurlEffect.Controls;
builder.UseMauiApp<App>().UseCurlEffect();
Usage
xmlns:controls="clr-namespace:CurlEffect.Controls;assembly=CurlEffect"
<controls:CurlView x:Name="Curl"
ItemsSource="{Binding Pages}"
CurrentIndex="{Binding Index, Mode=TwoWay}"
TurnSpeed="Normal" />
Each page is painted by a PageDrawer / DrawPage callback (a default text drawer is used
otherwise), so a page can be anything you can draw on an SKCanvas.
Navigation API
All of the following exist as a method, an ...Async variant, and an ICommand:
| API | Behaviour |
|---|---|
Next() / Previous() |
Turn one page |
Animate(value) |
Animate to a view — non-negative = absolute index, negative = pages back from current; clamps to first/last |
AnimateFrom(origin, value) |
As above, but the curl grips from a CurlOrigin (TopLeft, TopRight, Middle, BottomRight, BottomLeft) |
AnimateToStart() / AnimateToEnd() |
Single-turn jump to the first/last view (intermediate views are not shown) |
StopAnimation() |
Halt an in-progress turn and settle |
TurnSpeed (Fast / Normal / Slow) is bindable and applies to every animated turn.
Use from any IView
The contract is exposed as ICurlView : IView, with extension methods on IView so the API can be
called on any view reference (a safe no-op when the view isn't curl-capable):
using CurlEffect.Controls;
IView view = GetSomeView();
await view.AnimateToEndAsync();
view.AnimateFrom(CurlOrigin.TopRight, 0);
if (view.IsCurlView()) view.Next();
License
MIT
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0-android36.0 is compatible. net10.0-ios26.0 is compatible. net10.0-maccatalyst26.0 is compatible. net10.0-windows10.0.19041 is compatible. |
-
net10.0-android36.0
- Microsoft.Maui.Controls (>= 10.0.20)
- SkiaSharp.Views.Maui.Controls (>= 3.119.4)
-
net10.0-ios26.0
- Microsoft.Maui.Controls (>= 10.0.20)
- SkiaSharp.Views.Maui.Controls (>= 3.119.4)
-
net10.0-maccatalyst26.0
- Microsoft.Maui.Controls (>= 10.0.20)
- SkiaSharp.Views.Maui.Controls (>= 3.119.4)
-
net10.0-windows10.0.19041
- Microsoft.Maui.Controls (>= 10.0.20)
- SkiaSharp.Views.Maui.Controls (>= 3.119.4)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
# CurlEffect
A bindable, book-style **page-curl control for .NET MAUI**, rendered with SkiaSharp. Drag from any
edge to turn pages, or drive it programmatically with sync / async / `ICommand` APIs.
## Install
```sh
dotnet add package Plugin.CurlEffect
```
Register the plugin in your `MauiProgram` (this also wires up SkiaSharp):
```csharp
using CurlEffect.Controls;
builder.UseMauiApp<App>().UseCurlEffect();
```
## Usage
```xml
xmlns:controls="clr-namespace:CurlEffect.Controls;assembly=CurlEffect"
<controls:CurlView x:Name="Curl"
ItemsSource="{Binding Pages}"
CurrentIndex="{Binding Index, Mode=TwoWay}"
TurnSpeed="Normal" />
```
Each page is painted by a `PageDrawer` / `DrawPage` callback (a default text drawer is used
otherwise), so a page can be anything you can draw on an `SKCanvas`.
## Navigation API
All of the following exist as a **method**, an **`...Async`** variant, and an **`ICommand`**:
| API | Behaviour |
| --- | --- |
| `Next()` / `Previous()` | Turn one page |
| `Animate(value)` | Animate to a view — non-negative = absolute index, negative = pages back from current; clamps to first/last |
| `AnimateFrom(origin, value)` | As above, but the curl grips from a `CurlOrigin` (`TopLeft`, `TopRight`, `Middle`, `BottomRight`, `BottomLeft`) |
| `AnimateToStart()` / `AnimateToEnd()` | Single-turn jump to the first/last view (intermediate views are not shown) |
| `StopAnimation()` | Halt an in-progress turn and settle |
`TurnSpeed` (`Fast` / `Normal` / `Slow`) is bindable and applies to every animated turn.
## Use from any `IView`
The contract is exposed as `ICurlView : IView`, with extension methods on `IView` so the API can be
called on any view reference (a safe no-op when the view isn't curl-capable):
```csharp
using CurlEffect.Controls;
IView view = GetSomeView();
await view.AnimateToEndAsync();
view.AnimateFrom(CurlOrigin.TopRight, 0);
if (view.IsCurlView()) view.Next();
```
## License
MIT