aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.SharedUI/ExtensionMethods
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-04-24 19:05:53 +0300
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-04-24 19:05:53 +0300
commit97e45f70267d961168b77b149022b94022e0e199 (patch)
tree89bf6c1c893ab099ef99690d155a0855ba8a9d92 /Software/Visual_Studio/Tango.SharedUI/ExtensionMethods
parent8046598cb1439b66a8d6e556a61b715fc859a6b0 (diff)
downloadTango-97e45f70267d961168b77b149022b94022e0e199.tar.gz
Tango-97e45f70267d961168b77b149022b94022e0e199.zip
Working on reporting...
Diffstat (limited to 'Software/Visual_Studio/Tango.SharedUI/ExtensionMethods')
-rw-r--r--Software/Visual_Studio/Tango.SharedUI/ExtensionMethods/FrameworkElementExtensions.cs18
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);
+ }
+}