diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-04-24 19:05:53 +0300 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-04-24 19:05:53 +0300 |
| commit | 97e45f70267d961168b77b149022b94022e0e199 (patch) | |
| tree | 89bf6c1c893ab099ef99690d155a0855ba8a9d92 /Software/Visual_Studio/Tango.SharedUI/ExtensionMethods/FrameworkElementExtensions.cs | |
| parent | 8046598cb1439b66a8d6e556a61b715fc859a6b0 (diff) | |
| download | Tango-97e45f70267d961168b77b149022b94022e0e199.tar.gz Tango-97e45f70267d961168b77b149022b94022e0e199.zip | |
Working on reporting...
Diffstat (limited to 'Software/Visual_Studio/Tango.SharedUI/ExtensionMethods/FrameworkElementExtensions.cs')
| -rw-r--r-- | Software/Visual_Studio/Tango.SharedUI/ExtensionMethods/FrameworkElementExtensions.cs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Tango.SharedUI/ExtensionMethods/FrameworkElementExtensions.cs b/Software/Visual_Studio/Tango.SharedUI/ExtensionMethods/FrameworkElementExtensions.cs new file mode 100644 index 000000000..422b078a4 --- /dev/null +++ b/Software/Visual_Studio/Tango.SharedUI/ExtensionMethods/FrameworkElementExtensions.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Drawing.Imaging; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Media.Imaging; +using Tango.SharedUI.Rendering; + +public static class FrameworkElementExtensions +{ + public static void RenderToFile(this FrameworkElement element, String filePath, ImageFormat format, Size renderSize, int quality) + { + RenderWindow renderer = new RenderWindow(element); + renderer.RenderToFileSynced(new Size(element.Width, element.Height), renderSize, filePath, format, quality, null); + } +} |
