Export (0) Print
Expand All

FlowDocumentReader.Zoom Property

Gets or sets the current zoom level.

Namespace: System.Windows.Controls
Assembly: PresentationFramework (in presentationframework.dll)
XML Namespace:  http://schemas.microsoft.com/winfx/2006/xaml/presentation

'Declaration
Public Property Zoom As Double
'Usage
Dim instance As FlowDocumentReader
Dim value As Double

value = instance.Zoom

instance.Zoom = value
/** @property */
public double get_Zoom ()

/** @property */
public void set_Zoom (double value)

public function get Zoom () : double

public function set Zoom (value : double)

<object Zoom="double" .../>

Property Value

The current zoom level. This property is interpreted as a percentage. The default value is 100.0 (a zoom level of 100%).

Identifier Field

ZoomProperty

Metadata Flags

None

Default FlowDocumentReaderuser interface (UI) includes a zoom control that provides buttons for increasing or decreasing the zoom, as well as a slider for adjusting the zoom level. The following figure shows the zoom controls on a FlowDocumentReader with default UI.

Screenshot: FlowDocumentReader content zoom

The zoom level is constrained by the values of the MinZoom and MaxZoom properties.

The following example shows how to set the Zoom attribute.

<FlowDocumentReader
  IsFindEnabled="True"  
  IsPrintEnabled="True"
  MinZoom="50" MaxZoom="1000"
  Zoom="120" ZoomIncrement="5"
>
  <FlowDocument>
    <Paragraph>
      Flow content...
    </Paragraph>
  </FlowDocument>
</FlowDocumentReader>

The following example shows how to set the Zoom property programmatically.

FlowDocumentReader flowDocRdr = new FlowDocumentReader();

// Enable find...
flowDocRdr.IsFindEnabled = true;
// Enable printing...
flowDocRdr.IsPrintEnabled = true;
// Set zoom between 50% and 1000%.
flowDocRdr.MinZoom = 50;
flowDocRdr.MaxZoom = 1000;
// Set the zoom increment to 5%.
flowDocRdr.ZoomIncrement = 5;
// Set the initial zoom to 120%.
flowDocRdr.Zoom = 120;

FlowDocument flowDoc = new FlowDocument(new Paragraph(new Run("Flow content...")));
flowDocRdr.Document = flowDoc;

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions

ADD
Show:
© 2014 Microsoft