Class Cycler
A basic widget for cycling between an arbitrary number of pages.
Inherited Members
Namespace: SociallyDistant.Core.UI.Recycling.SettingsWidgets
Assembly: SociallyDistant.Framework.dll
Syntax
public sealed class Cycler : Widget, IFontFamilyProvider, IInspectable
Constructors
Cycler()
Creates a new instance of the Cycler widget.
Declaration
public Cycler()
Properties
CurrentPage
Gets or sets the current page.
Declaration
public int CurrentPage { get; set; }
Property Value
Type | Description |
---|---|
int |
Exceptions
Type | Condition |
---|---|
ArgumentOutOfRangeException | The new page value is outside of the valid range of pages. |
NumberOfPages
Gets or sets the total amount of pages.
Declaration
public int NumberOfPages { get; set; }
Property Value
Type | Description |
---|---|
int |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | The value isn't positive. |
TextFormat
Gets a format sdtring to use for displaying the current page.
Declaration
public string TextFormat { get; set; }
Property Value
Type | Description |
---|---|
string |
Methods
GoBack()
Go to the previous page in the cycle.
Declaration
public void GoBack()
GoForward()
Go to the next page in the cycle.
Declaration
public void GoForward()
Events
PageChanged
An event that's fired when the current page changes.
Declaration
public event Action<int>? PageChanged
Event Type
Type | Description |
---|---|
Action<int> |