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
Methods
RegisterGroup(string, Color, Action<SettingsGroupBuilder>)
Registers a settings group with multiple pages.
public void RegisterGroup(string name, Color accentColor, Action<SettingsGroupBuilder> configure)
Parameters
namestringThe display name of the settings group.
accentColorColorThe accent color used for this group in the navigation sidebar.
configureAction<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
namestringThe display name of the settings page.
iconstringOptional icon character or string shown beside the page name.
subtitlestringOptional subtitle shown below the page name.
contentAction<ScrollablePanelControl>Factory that populates the page content panel.
UnregisterGroup(string)
Removes a registered settings group by name.
public void UnregisterGroup(string name)
Parameters
namestringThe name of the group to remove.