Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的一个页面上有一个地图控件,我希望对其拍照并将其显示在不同的屏幕上。有谁知道我怎么能做到这一点?地图在<Grid>.
<Grid>
您应该使用该类的Render方法WriteableBitmap:
Render
WriteableBitmap
var writeableBitmap = new WriteableBitmap(desiredWidth, desiredHeight); writeableBitmap.Render(mapControl, null); writeableBitmap.Invalidate(); image.Source = writeableBitmap;
MSDN 链接