diff --git a/Samples/Stylet.Samples.Hello/App.xaml b/Samples/Stylet.Samples.Hello/App.xaml
index 719d03f..a13969e 100644
--- a/Samples/Stylet.Samples.Hello/App.xaml
+++ b/Samples/Stylet.Samples.Hello/App.xaml
@@ -5,9 +5,7 @@
-
-
-
+
diff --git a/Samples/Stylet.Samples.Hello/Stylet.Samples.Hello.csproj b/Samples/Stylet.Samples.Hello/Stylet.Samples.Hello.csproj
index ad04b01..c4edc72 100644
--- a/Samples/Stylet.Samples.Hello/Stylet.Samples.Hello.csproj
+++ b/Samples/Stylet.Samples.Hello/Stylet.Samples.Hello.csproj
@@ -54,9 +54,6 @@
Designer
-
- ShellView.xaml
-
diff --git a/Samples/Stylet.Samples.TabNavigation/App.xaml b/Samples/Stylet.Samples.TabNavigation/App.xaml
index 6f4ef47..b532fec 100644
--- a/Samples/Stylet.Samples.TabNavigation/App.xaml
+++ b/Samples/Stylet.Samples.TabNavigation/App.xaml
@@ -5,9 +5,7 @@
-
-
-
+
diff --git a/Samples/Stylet.Samples.TabNavigation/Bootstrapper.cs b/Samples/Stylet.Samples.TabNavigation/Bootstrapper.cs
index 9559c90..5b3b69f 100644
--- a/Samples/Stylet.Samples.TabNavigation/Bootstrapper.cs
+++ b/Samples/Stylet.Samples.TabNavigation/Bootstrapper.cs
@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using System.Windows;
namespace Stylet.Samples.TabNavigation
{
diff --git a/Samples/Stylet.Samples.TabNavigation/ShellView.xaml b/Samples/Stylet.Samples.TabNavigation/ShellView.xaml
index a95f24c..63cf5af 100644
--- a/Samples/Stylet.Samples.TabNavigation/ShellView.xaml
+++ b/Samples/Stylet.Samples.TabNavigation/ShellView.xaml
@@ -4,12 +4,6 @@
xmlns:s="http://github.com/canton7/Stylet"
Title="ShellView" Height="300" Width="300">
-
-
-
-
-
-
-
+
diff --git a/Samples/Stylet.Samples.TabNavigation/ShellViewModel.cs b/Samples/Stylet.Samples.TabNavigation/ShellViewModel.cs
index 8468f37..619f43e 100644
--- a/Samples/Stylet.Samples.TabNavigation/ShellViewModel.cs
+++ b/Samples/Stylet.Samples.TabNavigation/ShellViewModel.cs
@@ -13,11 +13,5 @@ namespace Stylet.Samples.TabNavigation
this.ActivateItem(page1);
this.Items.Add(page2);
}
-
- public override async Task CanCloseAsync()
- {
- await Task.Delay(1000);
- return true;
- }
}
}
diff --git a/Samples/Stylet.Samples.TabNavigation/Stylet.Samples.TabNavigation.csproj b/Samples/Stylet.Samples.TabNavigation/Stylet.Samples.TabNavigation.csproj
index 9a96515..0b910b0 100644
--- a/Samples/Stylet.Samples.TabNavigation/Stylet.Samples.TabNavigation.csproj
+++ b/Samples/Stylet.Samples.TabNavigation/Stylet.Samples.TabNavigation.csproj
@@ -57,9 +57,6 @@
-
- ShellView.xaml
-
diff --git a/Stylet/Bootstrapper.cs b/Stylet/Bootstrapper.cs
index ad3267e..181f00b 100644
--- a/Stylet/Bootstrapper.cs
+++ b/Stylet/Bootstrapper.cs
@@ -10,12 +10,30 @@ using System.Windows.Threading;
namespace Stylet
{
- public class Bootstrapper
+ // We pretend to be a ResourceDictionary so the user can do:
+ //
+ //
+ //
+ //
+ //
+ // rather than:
+ //
+ //
+ //
+ //
+ //
+ //
+ //
+ // And also so that we can load the Stylet resources
+ public class Bootstrapper : ResourceDictionary
{
protected Application Application { get; private set; }
public Bootstrapper()
{
+ var rc = new ResourceDictionary() { Source = new Uri("/Stylet;component/StyletResourceDictionary.xaml", UriKind.Relative) };
+ this.MergedDictionaries.Add(rc);
+
this.Start();
}
diff --git a/Stylet/IoCBootstrapper.cs b/Stylet/IoCBootstrapper.cs
index ce44565..106f99f 100644
--- a/Stylet/IoCBootstrapper.cs
+++ b/Stylet/IoCBootstrapper.cs
@@ -5,6 +5,7 @@ using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
+using System.Windows;
namespace Stylet
{
diff --git a/Stylet/Stylet.csproj b/Stylet/Stylet.csproj
index b824f05..11bbc23 100644
--- a/Stylet/Stylet.csproj
+++ b/Stylet/Stylet.csproj
@@ -75,6 +75,12 @@
+
+
+ MSBuild:Compile
+ Designer
+
+