Class PreviewSettings
Contains some settings of the preview window.
Inheritance
Namespace: FastReport
Assembly: FastReport.dll
Syntax
[TypeConverter(typeof(FRExpandableObjectConverter))]
public class PreviewSettings
Constructors
PreviewSettings()
Initializes a new instance of the PreviewSettings class with default settings.
Declaration
public PreviewSettings()
Properties
AllowPrintToFile
Enables or disables the "Print to file" feature in the print dialog.
Declaration
public bool AllowPrintToFile { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Buttons
Gets or sets a set of buttons that will be visible in the preview's toolbar.
Declaration
public PreviewButtons Buttons { get; set; }
Property Value
Type | Description |
---|---|
PreviewButtons |
Examples
Here is an example how you can disable the "Print" and "EMail" buttons:
Config.PreviewSettings.Buttons = PreviewButtons.Open |
PreviewButtons.Save |
PreviewButtons.Find |
PreviewButtons.Zoom |
PreviewButtons.Outline |
PreviewButtons.PageSetup |
PreviewButtons.Edit |
PreviewButtons.Watermark |
PreviewButtons.Navigator |
PreviewButtons.Close;
Clouds
Specifies the set of exports in clouds that will be available in the preview's "save" menu.
Declaration
public PreviewClouds Clouds { get; set; }
Property Value
Type | Description |
---|---|
PreviewClouds |
Exports
Specifies the set of exports that will be available in the preview's "save" menu.
Declaration
public PreviewExports Exports { get; set; }
Property Value
Type | Description |
---|---|
PreviewExports |
FastScrolling
Gets or sets a value indicating whether the fast scrolling method should be used.
Declaration
public bool FastScrolling { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Remarks
If you enable this property, the gradient background will be disabled.
Icon
Gets or sets the icon for the preview window.
Declaration
public Icon Icon { get; set; }
Property Value
Type | Description |
---|---|
System.Drawing.Icon |
Messengers
Specifies the set of exports by messengers that will be available in the preview's "save" menu.
Declaration
[Browsable(false)]
public PreviewMessengers Messengers { get; set; }
Property Value
Type | Description |
---|---|
PreviewMessengers |
PagesInCache
Gets or sets the number of prepared pages that can be stored in the memory cache during preview.
Declaration
public int PagesInCache { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Remarks
Decrease this value if your prepared report contains a lot of pictures. This will save the RAM memory.
SaveInitialDirectory
Gets or sets the initial directory that is displayed by a save file dialog.
Declaration
public string SaveInitialDirectory { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ShowInTaskbar
Gets or sets a value indicating whether the preview window is displayed in the Windows taskbar.
Declaration
public bool ShowInTaskbar { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Text
Gets or sets the text for the preview window.
Declaration
public string Text { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Remarks
If no text is set, the default text "Preview" will be used.
TopMost
Gets or sets a value indicating whether the preview window should be displayed as a topmost form.
Declaration
public bool TopMost { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Events
PreviewOpened
Occurs when the standard preview window opened.
Declaration
public event EventHandler PreviewOpened
Event Type
Type | Description |
---|---|
System.EventHandler |
Remarks
You may use this event to change the standard preview window, for example, add an own button to it. The sender parameter in this event is the PreviewControl.