Home > Net >  /just a few points about winform redrawn after covering part of the control or WPF control available
/just a few points about winform redrawn after covering part of the control or WPF control available

Time:12-03

Good bosses
I work with Winform wrote a control that inherits from the panel, in his onpaint method redraw display images, image size will be very long (line scan camera), to the appearance of the 15 k * 40 k, then I need to do a drawing on the images (resizing, translation, etc., are implemented)
Problem: adjusting the upper drawing every time need to redraw the entire panel, when a larger image, shows very slow slow, resulting in adjustment is also very card
Then think like WPF, covered with a layer of other controls, set to transparent, but then I cracked
No matter by redrawing the upper cover by any means of control, the whole area will refresh, and then at the bottom of the image layer will continue to redraw
Want to the next, try
1 hang lower specific time intelligent control: call control. The SuspendLayout (); Useless
2 intercept the message SendMessage (pbxImage. Handle, WM_SETREDRAW, 0, IntPtr. Zero). Useless

Want to ask each big grandma, have what idea can explore

Must use winform, because the image to display a bitmap, the enlarged to see clarity gray, WPF didn't find what method can implement the map













All available 50 points in; (although the bosses don't care

CodePudding user response:

Winform and WPF on the difference between the former use GDI + drawing, the latter with DX, D2D display BMP no problem, not a Canvas control in WPF and Image element,

Use controls in the Winform shade cannot use transparent, transparent transparent, little use, but the custom Region property, put the shade part deducted with related geometric operation method,

CodePudding user response:

reference 1st floor icoolno1 response:
Winform and WPF on the difference between the former use GDI + drawing, the latter with DX, D2D display BMP no problem, not have Canvas control and Image control in WPF,

Use controls in the Winform shade cannot use transparent, transparent transparent, little use, but the custom Region properties, have not keep out with some relevant geometric operation method is deducted,


Hello, canvas and image in the WPF if amplifier, after drawing pixels and the pixels detection are only fuzzy excessive, but my side need to implement a single pixel, similar to the Windows's own image viewer, or in fact, if I can write out Windows 7 that can also bring their own, display speed and scaling of drag can be [his face], write out

But custom Region property, put the block with some relevant geometric operation method, and this means I create a Region, will I need to return to the area, for example, I will from the rectangular redraw a rectangular frame only, rather than the entire rectangle, is this meaning?

Thank you for reply

CodePudding user response:

refer to the second floor cheersfortwd response:
Quote: refer to 1st floor icoolno1 response:
Winform and WPF on the difference between the former use GDI + drawing, the latter with DX, D2D display BMP no problem, not have Canvas control and Image control in WPF,

Use controls in the Winform shade cannot use transparent, transparent transparent, little use, but the custom Region properties, have not keep out with some relevant geometric operation method is deducted,


Hello, canvas and image in the WPF if amplifier, after drawing pixels and the pixels detection are only fuzzy excessive, but my side need to implement a single pixel, similar to the Windows's own image viewer, or in fact, if I can write out Windows 7 that can also bring their own, display speed and scaling of drag can be [his face], write out

But custom Region property, put the block with some relevant geometric operation method, and this means I create a Region, will I need to return to the area, for example, I will from the rectangular redraw a rectangular frame only, rather than the entire rectangle, is this meaning?

Thank you

Yes, covering control will draw a frame,

CodePudding user response:

Draw a hollow form such as:

  • Related