How To Do It.
暂无分享,去创建一个
This article describes how to capture and persist a raw image from the Microsoft Surface screen by using the Presentation layer of the Microsoft Surface SDK and elements of the Core layer and the System.Drawing assembly. The Microsoft Windows Presentation Foundation (WPF) enables you to create and use custom graphics, and the System.Drawing assembly includes methods for handling bitmap images. The sample application in this topics creates a SurfaceWindow control that contains a single SurfaceButton control. When you place an item on the Microsoft Surface screen and press the button, an image of the item is captured and saved. The Microsoft Surface screen does not indicate that the image has been processed, but the button glows when you press it to indicate that the application responded. The captured image is saved to a local Temp.bmp file, and the sample application is immediately ready to capture another image. The file name of the captured image is always the same (Temp.bmp), so previously saved images are overwritten every time that you press the button. Note: You must have a Microsoft Surface unit to run the code that is used in this article. You cannot run this code by using a separate workstation and Surface Simulator.