2017-06-16 64 views
2

有没有办法检索/捕获在wpf应用程序文档查看器中打开的xps文档中的链接URI? 我使用文档查看器控件打开XPS文件如何将XPS文档中的链接URI传递给wpf应用程序?

<Grid> 
    <DocumentViewer x:Name="docview" HorizontalAlignment="Left" VerticalAlignment="Top"> 
     <FixedDocument/> 
    </DocumentViewer> 
</Grid> 

再有就是喜欢蓝色的打开的文档的链接下划线图片文字: picture of viewer and opened document

我喜欢点击的情况下,链接由我的自定义事件处理程序开始掌控

+0

你的问题是不是真的清楚。你能提供更多细节吗?你能发布你的代码吗? –

回答

1

关于什么:

<Grid> 
    <Grid.Resources> 
     <Style TargetType="Hyperlink"> 
      <Style.Setters> 
       <EventSetter Event="Click" Handler="OnClickHyperlinkElement" /> 
      </Style.Setters> 
     </Style> 
    </Grid.Resources> 
    <DocumentViewer x:Name="docview" HorizontalAlignment="Left" VerticalAlignment="Top"> 
     <FixedDocument/> 
    </DocumentViewer> 
</Grid> 
相关问题