Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
This topic has not yet been rated - Rate this topic

FlowDocumentScrollViewer.ZoomIncrement Property

Gets or sets the zoom increment.

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

public double ZoomIncrement { get; set; }
/** @property */
public double get_ZoomIncrement ()

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

public function get ZoomIncrement () : double

public function set ZoomIncrement (value : double)

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

Property Value

The current zoom increment. This property is interpreted as a percentage. The default value is 10.0 (zoom increments by 10%).

The zoom increment is the percentage by which the Zoom level is increased or decreased when the IncreaseZoom or DecreaseZoom commands are executed, respectively.

The following example shows how to set the ZoomIncrement attribute.

<FlowDocumentScrollViewer
  HorizontalScrollBarVisibility="Auto" 
  VerticalScrollBarVisibility="Auto" 
  IsSelectionEnabled="True" 
  IsToolBarVisible="True" 
  MinZoom="50" MaxZoom="1000"
  Zoom="120" ZoomIncrement="5"
>
  <FlowDocument>
    <Paragraph>
      Flow content...
    </Paragraph>
  </FlowDocument>
</FlowDocumentScrollViewer>

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

FlowDocumentScrollViewer flowDocScrollViewer = new FlowDocumentScrollViewer();

// Enable content selection.
flowDocScrollViewer.IsSelectionEnabled = true;
// Enable the toolbar.
flowDocScrollViewer.IsToolBarVisible = true;

// Set zoom between 50% and 1000%.
flowDocScrollViewer.MinZoom = 50;
flowDocScrollViewer.MaxZoom = 1000;
// Set the zoom increment to 5%.
flowDocScrollViewer.ZoomIncrement = 5;
// Set the initial zoom to 120%.
flowDocScrollViewer.Zoom = 120;

FlowDocument flowDoc = new FlowDocument(new Paragraph(new Run("Flow content...")));
flowDocScrollViewer.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
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft. All rights reserved.