Share via


FlowDocumentScrollViewer.ZoomIncrement Eigenschaft

Definition

Ruft den Zoomschritt ab oder legt diesen fest.

public:
 property double ZoomIncrement { double get(); void set(double value); };
public double ZoomIncrement { get; set; }
member this.ZoomIncrement : double with get, set
Public Property ZoomIncrement As Double

Eigenschaftswert

Double

Der aktuelle Zoomschritt, interpretiert als Prozentwert. Der Standardwert ist 10,0 (Zoomschritte von 10 %).

Beispiele

Im folgenden Beispiel wird gezeigt, wie das ZoomIncrement Attribut festgelegt wird.

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

Im folgenden Beispiel wird gezeigt, wie Sie die ZoomIncrement Eigenschaft programmgesteuert festlegen.

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;
Dim flowDocScrollViewer As New FlowDocumentScrollViewer()

With flowDocScrollViewer
    ' Enable content selection.
    .IsSelectionEnabled = True
    ' Enable the toolbar.
    .IsToolBarVisible = True

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

    Dim flowDoc As New FlowDocument(New Paragraph(New Run("Flow content...")))
    .Document = flowDoc
End With

Hinweise

Das Zoom-Inkrement ist der Prozentsatz, durch den die Ebene erhöht oder verringert wird, wenn die Zoom IncreaseZoom DecreaseZoom Befehle ausgeführt werden.

Informationen zur Abhängigkeitseigenschaft

Bezeichnerfeld ZoomIncrementProperty
Metadateneigenschaften auf true festgelegt Keine

Gilt für

Siehe auch