I'm creating all of the layers in my printMap control by phically adding them in again. For example:
//Bing Layer
ESRI.ArcGIS.Client.Bing.TileLayer bingLayer = new ESRI.ArcGIS.Client.Bing.TileLayer
{
ID = "BingLayer",
LayerStyle = ESRI.ArcGIS.Client.Bing.TileLayer.LayerType.Road,
Visible = true,
ServerType = ESRI.ArcGIS.Client.Bing.ServerType.Production,
Token = Application.Current.Resources["BingKey"].ToString()
};
printMap.Layers.Add(bingLayer);
The problem is if I display my control, like this I can print:
//create the printer view
printerView = new PrinterView();
LayoutRoot.Children.Add(printerView);
Once it has drawn, then you can call the following:
PrintDocument printHandler = new PrintDocument();
printHandler.PrintPage += new EventHandler<PrintPageEventArgs>(printHandler_PrintPage);
printHandler.Print("Print Page");
But if I create the PrinterView and don't add it to LayoutRoot and send it to the Print methods you always get a blank map.
I need a way of forcing the Map control to redraw.