【发布时间】:2021-09-01 05:21:19
【问题描述】:
当我尝试将新的 pdf 文档添加到视图中时,出现异常 {"Value does not fall within the expected range."}。在视图中,有两个 pdf 文档要加载。一个已加载,另一个在加载时抛出此异常。
这是 c# 代码。
(this.DataContext as ViewerPageViewModel).Activate();
(this.DataContext as ViewerPageViewModel).OpenDoc(pdfDoc);
PDFViewCtrlBorder.Child = (this.DataContext as ViewerPageViewModel).PDFViewCtrl;
这是 XAML 代码。
<Grid
x:Name="PaperGrid"
Grid.Row="0"
Grid.RowSpan="2"
Background="{StaticResource WhiteBackgroundBrush}"
Visibility="Collapsed">
<Border x:Name="PDFViewCtrlBorder" >
<Grid>
<Border Child="{Binding}" />
</Grid>
</Border>
</Grid>
【问题讨论】:
标签: c# pdf uwp document pdftron