如何将 link URI 从 XPS 文档传递到 wpf 应用程序?
How to pass a link URI from a XPS document to wpf app?
有没有办法在 xps 文档中 retrieve/catch link URI 在 wpf 应用程序文档查看器中打开?
我正在使用文档查看器控件打开 xps 文件:
<Grid>
<DocumentViewer x:Name="docview" HorizontalAlignment="Left" VerticalAlignment="Top">
<FixedDocument/>
</DocumentViewer>
</Grid>
然后在打开的文档中有一个link,如图中蓝色下划线的文字:
picture of viewer and opened document
我喜欢通过我的自定义事件处理程序单击 link 开始掌上电脑的事件。
怎么样:
<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>
有没有办法在 xps 文档中 retrieve/catch link URI 在 wpf 应用程序文档查看器中打开? 我正在使用文档查看器控件打开 xps 文件:
<Grid>
<DocumentViewer x:Name="docview" HorizontalAlignment="Left" VerticalAlignment="Top">
<FixedDocument/>
</DocumentViewer>
</Grid>
然后在打开的文档中有一个link,如图中蓝色下划线的文字:
picture of viewer and opened document
我喜欢通过我的自定义事件处理程序单击 link 开始掌上电脑的事件。
怎么样:
<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>