diff --git a/Avalonia.sln b/Avalonia.sln
index 1878d07234..67fc548fed 100644
--- a/Avalonia.sln
+++ b/Avalonia.sln
@@ -168,6 +168,7 @@ EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WindowsInteropTest", "samples\interop\WindowsInteropTest\WindowsInteropTest.csproj", "{C7A69145-60B6-4882-97D6-A3921DD43978}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GtkInteropDemo", "samples\interop\GtkInteropDemo\GtkInteropDemo.csproj", "{BD7F352C-6DC1-4740-BAF2-2D34A038728C}"
+EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Avalonia.DotNetFrameworkRuntime", "src\Avalonia.DotNetFrameworkRuntime\Avalonia.DotNetFrameworkRuntime.csproj", "{4A1ABB09-9047-4BD5-A4AD-A055E52C5EE0}"
EndProject
Global
@@ -2252,7 +2253,6 @@ Global
{C7A69145-60B6-4882-97D6-A3921DD43978}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU
{C7A69145-60B6-4882-97D6-A3921DD43978}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|Any CPU
{C7A69145-60B6-4882-97D6-A3921DD43978}.Ad-Hoc|Mono.ActiveCfg = Release|Any CPU
- {C7A69145-60B6-4882-97D6-A3921DD43978}.Ad-Hoc|Mono.Build.0 = Release|Any CPU
{C7A69145-60B6-4882-97D6-A3921DD43978}.Ad-Hoc|x86.ActiveCfg = Release|Any CPU
{C7A69145-60B6-4882-97D6-A3921DD43978}.Ad-Hoc|x86.Build.0 = Release|Any CPU
{C7A69145-60B6-4882-97D6-A3921DD43978}.AppStore|Any CPU.ActiveCfg = Release|Any CPU
@@ -2262,7 +2262,6 @@ Global
{C7A69145-60B6-4882-97D6-A3921DD43978}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU
{C7A69145-60B6-4882-97D6-A3921DD43978}.AppStore|iPhoneSimulator.Build.0 = Release|Any CPU
{C7A69145-60B6-4882-97D6-A3921DD43978}.AppStore|Mono.ActiveCfg = Release|Any CPU
- {C7A69145-60B6-4882-97D6-A3921DD43978}.AppStore|Mono.Build.0 = Release|Any CPU
{C7A69145-60B6-4882-97D6-A3921DD43978}.AppStore|x86.ActiveCfg = Release|Any CPU
{C7A69145-60B6-4882-97D6-A3921DD43978}.AppStore|x86.Build.0 = Release|Any CPU
{C7A69145-60B6-4882-97D6-A3921DD43978}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
@@ -2272,7 +2271,6 @@ Global
{C7A69145-60B6-4882-97D6-A3921DD43978}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{C7A69145-60B6-4882-97D6-A3921DD43978}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{C7A69145-60B6-4882-97D6-A3921DD43978}.Debug|Mono.ActiveCfg = Debug|Any CPU
- {C7A69145-60B6-4882-97D6-A3921DD43978}.Debug|Mono.Build.0 = Debug|Any CPU
{C7A69145-60B6-4882-97D6-A3921DD43978}.Debug|x86.ActiveCfg = Debug|Any CPU
{C7A69145-60B6-4882-97D6-A3921DD43978}.Debug|x86.Build.0 = Debug|Any CPU
{C7A69145-60B6-4882-97D6-A3921DD43978}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -2282,7 +2280,6 @@ Global
{C7A69145-60B6-4882-97D6-A3921DD43978}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{C7A69145-60B6-4882-97D6-A3921DD43978}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{C7A69145-60B6-4882-97D6-A3921DD43978}.Release|Mono.ActiveCfg = Release|Any CPU
- {C7A69145-60B6-4882-97D6-A3921DD43978}.Release|Mono.Build.0 = Release|Any CPU
{C7A69145-60B6-4882-97D6-A3921DD43978}.Release|x86.ActiveCfg = Release|Any CPU
{C7A69145-60B6-4882-97D6-A3921DD43978}.Release|x86.Build.0 = Release|Any CPU
{BD7F352C-6DC1-4740-BAF2-2D34A038728C}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU
diff --git a/samples/interop/GtkInteropDemo/GtkInteropDemo.csproj b/samples/interop/GtkInteropDemo/GtkInteropDemo.csproj
index 9f69090ce5..0d87af8838 100644
--- a/samples/interop/GtkInteropDemo/GtkInteropDemo.csproj
+++ b/samples/interop/GtkInteropDemo/GtkInteropDemo.csproj
@@ -92,6 +92,10 @@
{7062ae20-5dcc-4442-9645-8195bdece63e}Avalonia.Diagnostics
+
+ {4a1abb09-9047-4bd5-a4ad-a055e52c5ee0}
+ Avalonia.DotNetFrameworkRuntime
+ {62024b2d-53eb-4638-b26b-85eeaa54866e}Avalonia.Input
diff --git a/samples/interop/WindowsInteropTest/WindowsInteropTest.csproj b/samples/interop/WindowsInteropTest/WindowsInteropTest.csproj
index 24f090a545..827f73d7ae 100644
--- a/samples/interop/WindowsInteropTest/WindowsInteropTest.csproj
+++ b/samples/interop/WindowsInteropTest/WindowsInteropTest.csproj
@@ -116,6 +116,10 @@
{7062ae20-5dcc-4442-9645-8195bdece63e}Avalonia.Diagnostics
+
+ {4a1abb09-9047-4bd5-a4ad-a055e52c5ee0}
+ Avalonia.DotNetFrameworkRuntime
+ {62024b2d-53eb-4638-b26b-85eeaa54866e}Avalonia.Input
diff --git a/src/Avalonia.Controls/AppBuilder.cs b/src/Avalonia.Controls/AppBuilderBase.cs
similarity index 79%
rename from src/Avalonia.Controls/AppBuilder.cs
rename to src/Avalonia.Controls/AppBuilderBase.cs
index 82698acde7..5afbb444ee 100644
--- a/src/Avalonia.Controls/AppBuilder.cs
+++ b/src/Avalonia.Controls/AppBuilderBase.cs
@@ -10,7 +10,8 @@ namespace Avalonia.Controls
///
/// Initializes up platform-specific services for an .
///
- public abstract class AppBuilderBase where AppBuilder : AppBuilderBase, new()
+ ///
+ public abstract class AppBuilderBase where TAppBuilder : AppBuilderBase, new()
{
///
/// Gets or sets the instance.
@@ -41,7 +42,7 @@ namespace Avalonia.Controls
/// Gets or sets a method to call before is called on the
/// .
///
- public Action BeforeStartCallback { get; set; }
+ public Action BeforeStartCallback { get; set; }
protected AppBuilderBase(IRuntimePlatform platform, Action platformSevices)
{
@@ -53,8 +54,8 @@ namespace Avalonia.Controls
/// Begin configuring an .
///
/// The subclass of to configure.
- /// An instance.
- public static AppBuilder Configure()
+ /// An instance.
+ public static TAppBuilder Configure()
where TApp : Application, new()
{
return Configure(new TApp());
@@ -63,26 +64,26 @@ namespace Avalonia.Controls
///
/// Begin configuring an .
///
- /// An instance.
- public static AppBuilder Configure(Application app)
+ /// An instance.
+ public static TAppBuilder Configure(Application app)
{
AvaloniaLocator.CurrentMutable.BindToSelf(app);
- return new AppBuilder()
+ return new TAppBuilder()
{
Instance = app,
};
}
- protected AppBuilder Self => (AppBuilder) this;
+ protected TAppBuilder Self => (TAppBuilder) this;
///
/// Registers a callback to call before is called on the
/// .
///
/// The callback.
- /// An instance.
- public AppBuilder BeforeStarting(Action callback)
+ /// An instance.
+ public TAppBuilder BeforeStarting(Action callback)
{
BeforeStartCallback = callback;
return Self;
@@ -107,7 +108,7 @@ namespace Avalonia.Controls
/// Sets up the platform-specific services for the application, but does not run it.
///
///
- public AppBuilder SetupWithoutStarting()
+ public TAppBuilder SetupWithoutStarting()
{
Setup();
return Self;
@@ -117,8 +118,8 @@ namespace Avalonia.Controls
/// Specifies a windowing subsystem to use.
///
/// The method to call to initialize the windowing subsystem.
- /// An instance.
- public AppBuilder UseWindowingSubsystem(Action initializer)
+ /// An instance.
+ public TAppBuilder UseWindowingSubsystem(Action initializer)
{
WindowingSubsystem = initializer;
return Self;
@@ -128,15 +129,15 @@ namespace Avalonia.Controls
/// Specifies a windowing subsystem to use.
///
/// The dll in which to look for subsystem.
- /// An instance.
- public AppBuilder UseWindowingSubsystem(string dll) => UseWindowingSubsystem(GetInitializer(dll));
+ /// An instance.
+ public TAppBuilder UseWindowingSubsystem(string dll) => UseWindowingSubsystem(GetInitializer(dll));
///
/// Specifies a rendering subsystem to use.
///
/// The method to call to initialize the rendering subsystem.
- /// An instance.
- public AppBuilder UseRenderingSubsystem(Action initializer)
+ /// An instance.
+ public TAppBuilder UseRenderingSubsystem(Action initializer)
{
RenderingSubsystem = initializer;
return Self;
@@ -146,8 +147,8 @@ namespace Avalonia.Controls
/// Specifies a rendering subsystem to use.
///
/// The dll in which to look for subsystem.
- /// An instance.
- public AppBuilder UseRenderingSubsystem(string dll) => UseRenderingSubsystem(GetInitializer(dll));
+ /// An instance.
+ public TAppBuilder UseRenderingSubsystem(string dll) => UseRenderingSubsystem(GetInitializer(dll));
static Action GetInitializer(string assemblyName) => () =>
{
diff --git a/src/Avalonia.Controls/Avalonia.Controls.csproj b/src/Avalonia.Controls/Avalonia.Controls.csproj
index 86c2fe2408..7a04e0747c 100644
--- a/src/Avalonia.Controls/Avalonia.Controls.csproj
+++ b/src/Avalonia.Controls/Avalonia.Controls.csproj
@@ -43,7 +43,7 @@
Properties\SharedAssemblyInfo.cs
-
+