FlowDocumentPageViewer.MaxZoom 属性

定义

获取或设置 Zoom 允许的最大 FlowDocumentPageViewer 级别。

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

属性值

FlowDocumentPageViewer 的最大允许缩放级别,以百分比表示。 默认值为 200.0(最大缩放比例为 200%)。

示例

以下示例演示如何使用此属性。

<FlowDocumentPageViewer
  MinZoom="50" MaxZoom="1000"
  Zoom="120" ZoomIncrement="5"
>
  <FlowDocument>
    <Paragraph>
      Flow content...
    </Paragraph>
  </FlowDocument>
</FlowDocumentPageViewer>
FlowDocumentPageViewer flowDocPageViewer = new FlowDocumentPageViewer();

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

FlowDocument flowDoc = new FlowDocument(new Paragraph(new Run("Flow content...")));
flowDocPageViewer.Document = flowDoc;
Dim flowDocPageViewer As New FlowDocumentPageViewer()

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

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

注解

FlowDocumentPageViewer默认用户界面 (UI) 包含可用于调整Zoom级别的滑块。 此属性指定滑块的上限值。

依赖项属性信息

标识符字段 MaxZoomProperty
元数据属性设置为 true

适用于

另请参阅