代码之家  ›  专栏  ›  技术社区  ›  Matt

禁用WPF流程文档中的搜索

  •  1
  • Matt  · 技术社区  · 17 年前

    我有一个在XAML中定义的流程文档,如下所示;

    <FlowDocumentScrollViewer>
        <FlowDocument>
            <Paragraph>
                <Run>Hello</Run>
            </Paragraph>
        </FlowDocument>
    </FlowDocumentScrollViewer>
    

    这可能吗?

    提前谢谢!

    1 回复  |  直到 17 年前
        1
  •  2
  •   Andy    17 年前

    你可以处理这个问题 PreviewKeyDown 事件,如果按下Ctrl-F或F3,则将事件标记为已处理。这将防止控件本身响应该事件并显示“查找”和“缩放”控件。