Interface IDesignerPlugin
Provides functionality required for report designer plugins such as toolbars and toolwindows.
Namespace: FastReport.Design
Assembly: FastReport.dll
Syntax
public interface IDesignerPlugin
Properties
PluginName
Gets the plugin name.
Declaration
string PluginName { get; }
Property Value
Type | Description |
---|---|
System.String |
Methods
GetOptionsPage()
Gets an options page that will be used in the Designer Options dialog to edit the plugin options.
Declaration
DesignerOptionsPage GetOptionsPage()
Returns
Type | Description |
---|---|
DesignerOptionsPage | The options page, if implemented; otherwise, null. |
Localize()
Localizes the plugin.
Declaration
void Localize()
Remarks
This method is called by the designer when current localization is changed.
Lock()
Locks the plugin.
Declaration
void Lock()
Remarks
This method is called by the designer when report is loading. It may be needed to disable some operations (like painting) that use the report.
RestoreState()
Restores the plugin state.
Declaration
void RestoreState()
Examples
This example shows how to restore the state:
public void RestoreState()
{
XmlItem xi = Config.Root.FindItem("Designer").FindItem(Name);
DialogWorkspace.ShowGrid = xi.GetProp("ShowGrid") != "0";
}
SaveState()
Saves the plugin state.
Declaration
void SaveState()
Examples
This example shows how to save the state:
public void SaveState()
{
XmlItem xi = Config.Root.FindItem("Designer").FindItem(Name);
xi.SetProp("ShowGrid", DialogWorkspace.ShowGrid ? "1" : "0");
}
SelectionChanged()
Updates plugin state when current selection was changed.
Declaration
void SelectionChanged()
Remarks
Typically you need to do the same work in the SelectionChanged() and UpdateContent() methods.
Unlock()
Unlocks the plugin.
Declaration
void Unlock()
UpdateContent()
Updates plugin state when the report was modified.
Declaration
void UpdateContent()
Remarks
Typically you need to do the same work in the SelectionChanged() and UpdateContent() methods.
UpdateDpiDependencies()
Updates layout on dpi change.
Declaration
void UpdateDpiDependencies()
UpdateUIStyle()
Updates UI style of the plugin.
Declaration
void UpdateUIStyle()
Remarks
The plugin should update its style according to the designer's UIStyle property.