FlexViewer for WPF > FlexViewer Features > Zoom the Report Preview |
FlexViewer provides Zoom Options dropdown menu in toolbar which allows you to set different zoom options, such as actual size, page width, whole page, and different zoom percentage levels.
The image shows a report with it's zoom mode set to Page Width.
To set the zoom level of the report displayed in the FlexViewer control, you can use the ZoomFactor property of C1FlexViewer. The ZoomFactor property takes float value to set the zoom level of the report. FlexViewer also allows you to limit the zoom level of the displayed report by using MinZoomFactor and MaxZoomFactor properties.
In addition, FlexViewer allows you to manage the zoom behavior of the previewed report. To specify the preview zoom mode, you can use the ZoomMode property. The ZoomMode property accepts values from the FlexViewerZoomMode enum.
The value of ZoomMode property can be set in the XAML as well as in code. To set the zoom mode, use the following code in XAML:
XAML |
Copy Code
|
---|---|
<c1:C1FlexViewer x:Name="Viewer" Grid.Row="1" ZoomMode="PageWidth"/> |
To set the preview zoom mode in code, you can use the ZoomMode property and FlexViewerZoomMode enum. The following code illustrates the use of ZoomMode property and FlexViewerZoomMode enum. This example uses the sample created in FlexReport Quick Start.
Viewer.ZoomMode = FlexViewerZoomMode.PageWidth
//Setting Zoom Mode
Viewer.ZoomMode = FlexViewerZoomMode.PageWidth;