Code will move MapView from here and place it in the above DocumentViewer. The user wants to be able to print the map but the application always throws an ArgumentNullException. ``` ``` public MainWindow() { InitializeComponent(); this.Loaded += (sender, args) => { // Remove the MapView from the Layout GridLayout.Children.Remove(MyMapView); MyMapView.Width = MyMapView.Height = 300; // Add the MapView to a Fixed Page var fixedPage = new FixedPage { Width = 300, Height = 300 }; fixedPage.Children.Add(MyMapView); GridLayout.Children.Remove(listBox); listBox.Width = listBox.Height = 300; fixedPage.Children.Add(listBox); // Add the FixedPage to the PageContent var pageContent = new PageContent { Child = fixedPage }; // Add the PageContent to the FixedDocument MyFixedDocument.Pages.Add(pageContent); }; } ```"/>
laptop and a wrench

漏洞

ArgumentNullException is returned when hosting MapView in Microsoft DocumentView control for client side printing.

上次发布: December 30, 2015 ArcGIS Runtime SDK
漏洞 ID 编号 BUG-000092761
已提交December 5, 2015
上次修改时间June 20, 2022
适用范围ArcGIS Runtime SDK
找到的版本10.2.5
服务器平台Windows OS
客户端平台7.0 64 Bit
状态Non-Reproducible

附加信息

Appears to be a bug in FixedDocument. Suggested workaround: ``` Code will move MapView from here and place it in the above DocumentViewer. The user wants to be able to print the map but the application always throws an ArgumentNullException. ``` ``` public MainWindow() { InitializeComponent(); this.Loaded += (sender, args) => { // Remove the MapView from the Layout GridLayout.Children.Remove(MyMapView); MyMapView.Width = MyMapView.Height = 300; // Add the MapView to a Fixed Page var fixedPage = new FixedPage { Width = 300, Height = 300 }; fixedPage.Children.Add(MyMapView); GridLayout.Children.Remove(listBox); listBox.Width = listBox.Height = 300; fixedPage.Children.Add(listBox); // Add the FixedPage to the PageContent var pageContent = new PageContent { Child = fixedPage }; // Add the PageContent to the FixedDocument MyFixedDocument.Pages.Add(pageContent); }; } ```

重现步骤

漏洞 ID: BUG-000092761

软件:

  • ArcGIS Runtime SDK

从 ArcGIS 专家处获得帮助

联系技术支持部门

下载 Esri 支持应用程序

转至下载选项

发现关于本主题的更多内容