Questions tagged [rendertargetbitmap]

The RenderTargetBitmap class, part of the .NET Framework (from version 3.0), converts a System.Windows.Media.Visual object into a bitmap.

The RenderTargetBitmap class (System.Windows.Media.Imaging.RenderTargetBitmap) converts a Visual (System.Windows.Media.Visual) object into a bitmap.

It can be used for example to render text as an image.

Support of RenderTargetBitmap was added to version 3.0 of the .NET Framework.

125 questions
0
votes
1 answer

Rendering a WPF canvas as a specificly sized bitmap

I have a WPF Canvas that I want to make a bitmap of. Specifically, I want to render it actual size on a 300dpi bitmap. The "actual size" of the objects on the canvas is 10 device independent pixels = 1" in real life. Theoretically, WPF device…
SvdSinner
  • 951
  • 1
  • 11
  • 23
0
votes
2 answers

How do I make RenderTargetBitmap and VisualBrush play nice together?

My requirements: a persistent UserControl that handles logic for a custom image, such as a map or drawing a set of containers to implement caching on the image during zoom or pan movements VisualBrush copies of the UserControl that I can add to the…
benjamin.popp
  • 547
  • 1
  • 6
  • 20
0
votes
1 answer

RenderTargetBitmap renders empty control if not set in a Window (Visiblox chart)

I'm trying to render a Visiblox chart to an image to be able to show hundreds of them at the same time. The chart is generated in code and rendered without showing it. The problem I'm facing is that the chart looks empty after rendering it. The…
Ignacio Soler Garcia
  • 21,122
  • 31
  • 128
  • 207
-1
votes
1 answer

How do I get a Visual (e.g. a UserControl) to be ready for copying by a RenderTargetBitmap?

The question has now been answered in a comment. Original question: The following is not enough: this.Background = Brushes.Yellow; RenderTargetBitmap bmp = new RenderTargetBitmap(...); Measure(...); Arrange(...); bmp.Render(this); If the color was…
ispiro
  • 26,556
  • 38
  • 136
  • 291
-1
votes
1 answer

WPF C# Capture Canvas image with semi-transparent background

UPDATE: Is not a duplicate. My question is not how to take a screenshot. I know this, but it's not what I need. I can have others controls over the Canvas and I don't want to capture them but just the image in the Canvas with the image that is…
user2272143
  • 469
  • 5
  • 22
1 2 3
8
9