FlowDocumentReader.IsFindEnabled 属性

定义

获取或设置一个值,该值指示是否启用了 Find 路由命令。

public:
 property bool IsFindEnabled { bool get(); void set(bool value); };
public bool IsFindEnabled { get; set; }
member this.IsFindEnabled : bool with get, set
Public Property IsFindEnabled As Boolean

属性值

如果启用 Find 路由命令,则为 true;否则为 false。 默认值为 true

示例

以下示例演示如何设置 IsFindEnabled 属性。

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

下面的示例演示如何以编程方式设置 IsFindEnabled 属性。

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;
Dim flowDocRdr As 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

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

注解

默认 FlowDocumentReader 用户界面 (UI) 包含一个用于切换“ 查找 ”对话框的“查找”按钮。 下图显示了 具有默认 UI 的 上的 FlowDocumentReader “查找” 对话框。

带标注的屏幕截图:FlowDocumentReader

当 为 falseIsFindEnabled“查找”按钮不会显示在 UI 上FlowDocumentReader

依赖项属性信息

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

适用于

另请参阅