Consuming MDI children thumbnails from MDI Container

Answered
0
0

The MDI container has the option to show thumbnails of the opened MDI children. I’d like to get these thumbnails from a Wisej class in order to use in another part of the application, is it possible?

  • You must to post comments
Best Answer
0
0

Hi Sergio,

while the before mentioned solution works fine, there is an alternative approach that is using the original method that recreates the DOM rather than taking a screenshot.

I have attached a simple sample that you might want to adapt until it fits your needs.

Key code is this snippet here:

this.Eval($@"
 debugger;
 var widget = Wisej.Core.getComponent('id_{this.Control.Handle}');
 var thumbnailEl = wisej.utils.Widget.makeThumbnail(widget, {{width:{this.Width},height:{this.Height}}}, 'fit');
 this.getContentElement().getDomElement().appendChild(thumbnailEl);
 ");

Best regards
Frank

  • Sergio Granzzotto
    Awesome! It’s perfect! That’s what I was talking about! Thank you so much, Frank!
  • You must to post comments
0
0

Hi Sergio,

I don´t think that this functionality is exposed directly but you might want to check out an extension that basically does the same thing:

https://github.com/iceteagroup/wisej-examples/tree/3.0/Html2Canvas

After getting the image you can scale it with standard .NET techniques to fit to your needs.

Best regards
Frank

  • Sergio Granzzotto
    Thank you Frank, but in this case the Html2Canvas distorts the screenshot, even keeping the same aspect ratio. I tried it and I did not like it.
  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.