Class FortuneItem
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
contentobjectThe 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
contentobjectThe content to display.
styleFortuneItemStyleCustom styling for this item.
Properties
Content
Gets or sets the content to display for this item.
public object? Content { get; set; }
Property Value
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
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
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; }