IPersistComponentSettings Interface
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Defines standard functionality for controls or libraries that store and retrieve application settings.
public interface class IPersistComponentSettings
public interface IPersistComponentSettings
type IPersistComponentSettings = interface
Public Interface IPersistComponentSettings
Remarks
Typically, you can add application settings support to an application by creating a settings wrapper class, which is derived from ApplicationSettingsBase, and then add special properties to this class. However, this approach does not sufficiently encapsulate application settings for a control so that its container is shielded from the details. The IPersistComponentSettings interface provides an application with a standard interface for communicating application settings state change requests to a control, component, or library module. Design-time tools also depend on this interface to properly manage controls and components.
Properties
SaveSettings |
Gets or sets a value indicating whether the control should automatically persist its application settings properties. |
SettingsKey |
Gets or sets the value of the application settings key for the current instance of the control. |
Methods
LoadComponentSettings() |
Reads the control's application settings into their corresponding properties and updates the control's state. |
ResetComponentSettings() |
Resets the control's application settings properties to their default values. |
SaveComponentSettings() |
Persists the control's application settings properties. |
Applies to
See also
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應