DialogPage.SaveSettingsToStorage Method

Definition

Called by Visual Studio to store the settings of a dialog page in local storage, typically the registry.

public:
 virtual void SaveSettingsToStorage();
public:
 virtual void SaveSettingsToStorage();
 virtual void SaveSettingsToStorage();
public virtual void SaveSettingsToStorage ();
abstract member SaveSettingsToStorage : unit -> unit
override this.SaveSettingsToStorage : unit -> unit
Public Overridable Sub SaveSettingsToStorage ()

Implements

Remarks

SaveSettingsToStorage implements Microsoft.VisualStudio.Shell.IProfileManager.SaveSettingsToStorage.

This method is called to save the settings of a dialog page to local (as opposed to disk) storage, typically from the registry.

The default implementation does the following things:

  • Saves setting information for all the properties of the dialog page's automation object that support conversion to a string through TypeConverter.

  • Stores settings in registry under the registry VSROOT\SettingsRegistryPath, where

    • VSROOT is the Visual Studio version-specific top-level registry entry, typically

      HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\Version, where

      Version is the Visual Studio version.

      An alternative root can be specified when the Visual Studio shell is initialized. For more information about how to specify an alternative root in the registry, see Command-Line Switches.

    • SettingsRegistryPath is the value that is returned by SettingsRegistryPath.

Note

Typically, an instance of a dialog page class is its own automation object. Therefore, properties that are stored are those of the DialogPage base class. However, if AutomationObject returns another object, it is that object's properties, and not the properties of the class, that are stored.

When the public properties of a dialog page are modified through its dialog window, SaveSettingsToStorage is automatically called to save the state to local storage (by default, the registry).

Applies to