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

Bug

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

Zuletzt veröffentlicht: December 30, 2015 ArcGIS Runtime SDK
Bug-ID-Nummer BUG-000092761
EingereichtDecember 5, 2015
Zuletzt geändertJune 20, 2022
Gilt fürArcGIS Runtime SDK
Gefunden in Version10.2.5
Server-PlattformWindows OS
Client-Plattform7.0 64 Bit
StatusNon-Reproducible

Zusätzliche Informationen

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); }; } ```

Schritte zur Reproduzierung

Bug-ID: BUG-000092761

Software:

  • ArcGIS Runtime SDK

Hilfe von ArcGIS-Expert*innen erhalten

Technischen Support kontaktieren

Die Esri Support-App herunterladen

Zu den Download-Optionen

Weitere Informationen zu diesem Thema erkunden