摘要: private BitmapSource GetUiImage(FrameworkElement ui) { RenderTargetBitmap bmp=new RenderTargetBitmap((int)ui.ActualWidth,(int)ui.ActualHeight,96d,96d, 阅读全文
posted @ 2019-06-10 14:59 一!雨 阅读(2767) 评论(0) 推荐(0) 编辑
摘要: 使用RenderTargetBitmap渲染图片时,必须在需要渲染的控件外层包含一个border控件,不然渲染的图片返回就会出现问题。 如下: <Grid> <Grid.RowDefinitions> <RowDefinition Height="35" /> <RowDefinition /> < 阅读全文
posted @ 2019-06-10 10:04 一!雨 阅读(1352) 评论(0) 推荐(0) 编辑