Dominique,I have successfully integrated your code into my application and think that it'll work for what we need it to do. Thank you so much for taking the time to develop it and to help us users out!If you have time, there are a few behaviors that I'd like to address...I have your print control inside a draggable-window control and this window is able to turn on/off. When the user first opens our map and pans around, adds/removes layers, adds graphics, etc. and then toggles the window on, the print shows all of the modifications and zooms to the extent the users is zoomed to. AWESOME!!!!However, if the user modifies the map in any way (adds another layer, zooms to another portion of the map, or adds/removes more graphics) those changes are not reflected in the preview window and I'm not positive they are reflected in the printout. This is what my XAML looks like:
<userControls:DraggableWindow IsOpen="True" x:Name="printWindow" Margin="0,20,20,0"
VerticalAlignment="Top" HorizontalAlignment="Right" Width="Auto" Height="Auto"
Padding="0" HorizontalContentAlignment="Stretch"
VerticalContentAlignment="Stretch" Title="Print Map" Background="{StaticResource BaseColor}" Grid.Column="2">
<i:Interaction.Triggers>
<i:EventTrigger>
<actions:ToggleWindowVisibilityAction/><!-- Hide at startup -->
</i:EventTrigger>
</i:Interaction.Triggers>
<ESRI_ArcGIS_Client_Samples_MapPrinting:PrintPreview x:Name="printPreviewMap" Grid.Column="1" HorizontalAlignment="Right" Margin="0,0,20,20" VerticalAlignment="Bottom">
<ESRI_ArcGIS_Client_Samples_MapPrinting:MapPrinter x:Name="printMap" Map="{Binding ElementName=MyMap}" MapUnits="Meters" d:LayoutOverrides="Width, Height" Style="{StaticResource MapPrinterStyle}" PrintExtent="{Binding Extent.Extent, ElementName=MyMap, Mode=TwoWay}" Title="{StaticResource Title}"/>
</ESRI_ArcGIS_Client_Samples_MapPrinting:PrintPreview>
</userControls:DraggableWindow>
Is there anyway that I can sync up the preview window with layers turning on/off, graphics added/removed, etc.? I can live without the preview window zooming with the map control, but it's a bit of a showstopper if the user can't see in the preview their latest edits.Thanks again for all your help!