SlotView.Maui 0.0.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package SlotView.Maui --version 0.0.1
NuGet\Install-Package SlotView.Maui -Version 0.0.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="SlotView.Maui" Version="0.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SlotView.Maui --version 0.0.1
#r "nuget: SlotView.Maui, 0.0.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.
// Install SlotView.Maui as a Cake Addin
#addin nuget:?package=SlotView.Maui&version=0.0.1

// Install SlotView.Maui as a Cake Tool
#tool nuget:?package=SlotView.Maui&version=0.0.1

<img src="https://raw.githubusercontent.com/nor0x/SlotView/main/Art/icon.png" width="320px" />

SlotView.Maui 🎰

.NET alternate text is missing from this package README image alternate text is missing from this package README image

a view that can animate images like a slot machine reel. Powered by Maui.Graphics and highly customizable.

read more about the development here in my blog http://johnnys.news/2023/04/Hello-SlotView-Maui

https://user-images.githubusercontent.com/3210391/235326369-8bedf844-841e-4485-935a-0c94b0cef98c.mp4

Installation

Add NuGet package to your project:

dotnet add package SlotView.Maui

or as PackageReference

<PackageReference Include="SlotView.Maui" Version="0.0.1" />

Usage

xmlns:sv="clr-namespace:SlotView.Maui;assembly=SlotView.Maui"
...
<sv:SlotView
    x:Name="mySlotView"
    Speed="10"
    Drag="0.1"
    StopIndex="5"
    VisibleCount="3">
    <sv:SlotView.Images>
        <x:Array Type="{x:Type x:String}">
            
            <x:String>myimg0.png</x:String>
            <x:String>https://foo.bar/myimg1.png</x:String>
            <x:String>myimg2.png</x:String>
            <x:String>https://foo.bar/myimg2.png</x:String>
        </x:Array>
    </sv:SlotView.Images>
</sv:SlotView>

or in code behind

var mySlotView = new SlotView
{
    Speed = 10,
    Drag = 0.1f,
    StopIndex = 5,
    VisibleCount = 3,
    Images = new string[]
    {
        "myimg0.png",
        "https://foo.bar/myimg1.png",
        "myimg2.png",
        "https://foo.bar/myimg2.png"
    }
};

SlotView Class Documentation

Properties

BackgroundColor property

Type: Color

Description: Gets or sets the background color of the control.

Images property

Type: string[]

Description: Gets or sets the list of image paths to be displayed in the control.

Speed property

Type: float

Description: Gets or sets the speed of the spinning animation.

MinimumSpeed property

Type: float

Description: Gets or sets the minimum speed that the spinning animation can reach.

Drag property

Type: float

Description: Gets or sets the drag of the spinning animation.

DragThreshold property

Type: int

Description: Gets or sets the drag threshold of the spinning animation.

VisibleCount property

Type: int

Description: Gets or sets the number of images to be displayed at once.

Delay property

Type: float

Description: Gets or sets the delay before the spinning animation starts.

Duration property

Type: float

Description: Gets or sets the duration of the spinning animation.

StopIndex property

Type: int

Description: Gets or sets the index of the image to stop the spinning animation at.

IsSpinning property

Type: bool

Description: Gets or sets a value indicating whether the spinning animation is currently running.

Direction property

Type: SlotDirection

Description: Gets or sets the direction of the spinning animation.

Events

ImagesLoaded event

Type: EventHandler

Description: Occurs when the list of images has been loaded and is ready for display.

Started event

Type: EventHandler

Description: Occurs when the spinning animation has started.

Paused event

Type: EventHandler

Description: Occurs when the spinning animation has been paused.

Finished event

Type: EventHandler

Description: Occurs when the spinning animation has finished.

Demo

You can find a demo project with multiple scenarious and customizations in the SlotView.Maui.Demo folder of this repository.

<img src="https://raw.githubusercontent.com/nor0x/SlotView/main/Art/demo1.png" width="500px" /> <img src="https://raw.githubusercontent.com/nor0x/SlotView/main/Art/demo2.png" width="500px" /> <img src="https://raw.githubusercontent.com/nor0x/SlotView/main/Art/demo3.png" width="500px" />

Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-android33.0 is compatible.  net7.0-ios was computed.  net7.0-ios16.1 is compatible.  net7.0-maccatalyst was computed.  net7.0-maccatalyst16.1 is compatible.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net7.0-windows10.0.19041 is compatible.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net7.0

    • No dependencies.
  • net7.0-android33.0

    • No dependencies.
  • net7.0-ios16.1

    • No dependencies.
  • net7.0-maccatalyst16.1

    • No dependencies.
  • net7.0-windows10.0.19041

    • No dependencies.

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
0.0.2 97 10/6/2023
0.0.1 172 4/30/2023