Sl 如何截屏 ?

dui_cky 2011-01-06 05:16:24
RT:
...全文
188 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
dui_cky 2011-01-09
  • 打赏
  • 举报
回复

感谢楼上们,问题解决~
windhuan 2011-01-06
  • 打赏
  • 举报
回复


internal static Size GetImageSize(FrameworkElement element)
{
return new Size(element.ActualWidth, element.ActualHeight);
}


internal static BitmapSource GetBitmapSource(FrameworkElement element)
{
Size imageSize = GetImageSize(element);
WriteableBitmap image = new WriteableBitmap((int)imageSize.Width, (int)imageSize.Height);
image.Render(element, null);
image.Invalidate();
return image;
}



截取silverlight 图片
image1.Source = GetBitmapSource(App.Current.RootVisual as FrameworkElement);

无法截取silverlight 控件外的

8,735

社区成员

发帖
与我相关
我的任务
社区描述
WPF/Silverlight相关讨论
社区管理员
  • WPF/Silverlight社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧