Skip to content

Latest commit

 

History

History
33 lines (24 loc) · 1.65 KB

File metadata and controls

33 lines (24 loc) · 1.65 KB
title ToggleSetting Class
description The ToggleSetting class represents a toggle setting in the Command Palette Extensions Toolkit and can be used to define settings that can be toggled on or off.
ms.date 2/26/2025
ms.topic reference
no-loc
PowerToys
Windows
Insider

ToggleSetting Class

Definition

Namespace: Microsoft.CommandPalette.Extensions.Toolkit

Inherits Setting<Boolean>

The ToggleSetting class represents a toggle setting in the Command Palette Extensions Toolkit. It is used to define settings that can be toggled on or off, such as enabling or disabling a feature.

Constructors

Constructor Description
ToggleSetting(String, Boolean) Creates a new instance of the ToggleSetting class with the specified name and default value.
ToggleSetting(String, String, String, Boolean) Creates a new instance of the ToggleSetting class with the specified name, description, category, and default value.

Methods

Method Description
LoadFromJson(JsonObject) Loads the toggle setting from a JSON object.
ToDictionary() Converts the toggle setting to a dictionary representation.
ToState() Converts the toggle setting to a state representation.
Update(JsonObject) Updates the toggle setting with the specified JSON object.