Table of Contents

Class FortuneItem

Namespace
Nova.Avalonia.UI.Controls
Assembly
Nova.Avalonia.UI.dll

Represents an individual item in a Fortune control (wheel or bar).

public class FortuneItem
Inheritance
FortuneItem
Inherited Members

Constructors

FortuneItem()

Initializes a new instance of the FortuneItem class.

public FortuneItem()

FortuneItem(object?)

Initializes a new instance of the FortuneItem class with content.

public FortuneItem(object? content)

Parameters

content object

The content to display.

FortuneItem(object?, FortuneItemStyle?)

Initializes a new instance of the FortuneItem class with content and style.

public FortuneItem(object? content, FortuneItemStyle? style)

Parameters

content object

The content to display.

style FortuneItemStyle

Custom styling for this item.

Properties

Content

Gets or sets the content to display for this item.

public object? Content { get; set; }

Property Value

object

ContentTemplate

Gets or sets the template used to display the content.

public IDataTemplate? ContentTemplate { get; set; }

Property Value

IDataTemplate

Name

Gets or sets a user-friendly name for this item. Useful when Content is a complex object (like an Image).

public string? Name { get; set; }

Property Value

string

Style

Gets or sets custom styling for this specific item. When null, the control's StyleStrategy is used.

public FortuneItemStyle? Style { get; set; }

Property Value

FortuneItemStyle

Weight

Gets or sets the weight for weighted random selection. Higher values increase the probability of this item being selected. Default is 1.0.

public double Weight { get; set; }

Property Value

double