Export (0) Print
Expand All

Managing Plugin Options

Global plugin options (settings and defaults that affect the behavior of all instances of the plugin) are accessible through the WriterPlugin.Options object (WriterPlugin is the base class for all Writer plugins).

Aa738913.note(en-us,WIN.10).gifNote:
The reference to plugin options is populated during the call to the WriterPlugin.Initialize method. Therefore, if your plugin overrides this method you must be sure to call the base implementation.

Some plugin options may be maintained implicitly (e.g. remembering the last selection in a list or last size of an inserted object) and some may require direct editing by users. Users can access an options dialog box for your plugin from the Plugins Preferences panel. If you wish to provide this capability you need to use the procedure later in this topic.

Note that Writer plugin options are global to all instances of the plugin. They should therefore be used only for shared settings and not for content-instance specific settings (which should be stored using ISmartContent.Properties).

  1. Set the value of the WriterPluginAttribute.HasEditableOptions property to True (it defaults to False). This will cause an Options button to appear for your plugin within the Plugins Preferences panel.

  2. Override the WriterPlugin.EditOptions method.

Show:
© 2014 Microsoft