diff --git a/samples/SharpDx2D/App.config b/samples/SharpDx2D/App.config
new file mode 100644
index 0000000..d1428ad
--- /dev/null
+++ b/samples/SharpDx2D/App.config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/samples/SharpDx2D/App.xaml b/samples/SharpDx2D/App.xaml
new file mode 100644
index 0000000..b026861
--- /dev/null
+++ b/samples/SharpDx2D/App.xaml
@@ -0,0 +1,9 @@
+
+
+
+
+
diff --git a/samples/SharpDx2D/App.xaml.cs b/samples/SharpDx2D/App.xaml.cs
new file mode 100644
index 0000000..5cc7568
--- /dev/null
+++ b/samples/SharpDx2D/App.xaml.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Configuration;
+using System.Data;
+using System.Linq;
+using System.Threading.Tasks;
+using System.Windows;
+
+namespace SharpDx2D
+{
+ ///
+ /// Interaction logic for App.xaml
+ ///
+ public partial class App : Application
+ {
+ }
+}
diff --git a/samples/SharpDx2D/MainWindow.xaml b/samples/SharpDx2D/MainWindow.xaml
new file mode 100644
index 0000000..b43a36c
--- /dev/null
+++ b/samples/SharpDx2D/MainWindow.xaml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
diff --git a/samples/SharpDx2D/MainWindow.xaml.cs b/samples/SharpDx2D/MainWindow.xaml.cs
new file mode 100644
index 0000000..6321edf
--- /dev/null
+++ b/samples/SharpDx2D/MainWindow.xaml.cs
@@ -0,0 +1,106 @@
+using System;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Media;
+using SharpDX.Direct2D1;
+
+namespace SharpDx2D
+{
+ ///
+ /// Interaction logic for MainWindow.xaml
+ ///
+ public partial class MainWindow : Window
+ {
+ private TimeSpan lastRenderTime;
+ private RenderTarget renderTarget = null;
+ private SharpDX.DirectWrite.TextLayout textLayout;
+ private SharpDX.Direct2D1.Brush brush;
+
+ public MainWindow()
+ {
+ InitializeComponent();
+ Loaded += MainWindow_Loaded;
+ SizeChanged += MainWindow_SizeChanged;
+ }
+
+ private void MainWindow_SizeChanged(object sender, SizeChangedEventArgs e)
+ {
+ Grid g = (Grid)Content;
+ if (g.ActualWidth > 0 && g.ActualHeight > 0)
+ {
+ InteropImage.SetPixelSize((int)g.ActualWidth, (int)g.ActualHeight);
+ }
+ else
+ {
+ Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Background, (Action