Table of Contents

Class SettingsRegistrationService

Namespace
SharpConsoleUI.Core
Assembly
SharpConsoleUI.dll

Stores custom settings group and page registrations for the Settings dialog.

public sealed class SettingsRegistrationService
Inheritance
SettingsRegistrationService
Inherited Members
Extension Methods

Properties

Groups

Gets all registered settings groups.

public IReadOnlyList<SettingsGroupRegistration> Groups { get; }

Property Value

IReadOnlyList<SettingsGroupRegistration>

Methods

RegisterGroup(string, Color, Action<SettingsGroupBuilder>)

Registers a settings group with multiple pages.

public void RegisterGroup(string name, Color accentColor, Action<SettingsGroupBuilder> configure)

Parameters

name string

The display name of the settings group.

accentColor Color

The accent color used for this group in the navigation sidebar.

configure Action<SettingsGroupBuilder>

Action that configures the group's pages via a builder.

RegisterPage(string, string?, string?, Action<ScrollablePanelControl>?)

Registers a single settings page under the "Extensions" group. Creates the Extensions group if it does not already exist.

public void RegisterPage(string name, string? icon = null, string? subtitle = null, Action<ScrollablePanelControl>? content = null)

Parameters

name string

The display name of the settings page.

icon string

Optional icon character or string shown beside the page name.

subtitle string

Optional subtitle shown below the page name.

content Action<ScrollablePanelControl>

Factory that populates the page content panel.

UnregisterGroup(string)

Removes a registered settings group by name.

public void UnregisterGroup(string name)

Parameters

name string

The name of the group to remove.