diff --git a/.gitignore b/.gitignore
index 567609b12..5fd7117fa 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,307 @@
build/
+
+## Ignore Visual Studio temporary files, build results, and
+## files generated by popular Visual Studio add-ons.
+##
+## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
+
+# User-specific files
+*.suo
+*.user
+*.userosscache
+*.sln.docstates
+
+# User-specific files (MonoDevelop/Xamarin Studio)
+*.userprefs
+
+# Build results
+[Dd]ebug/
+[Dd]ebugPublic/
+[Rr]elease/
+[Rr]eleases/
+x64/
+x86/
+bld/
+[Bb]in/
+[Oo]bj/
+[Ll]og/
+
+# Visual Studio 2015 cache/options directory
+.vs/
+# Uncomment if you have tasks that create the project's static files in wwwroot
+#wwwroot/
+
+# MSTest test Results
+[Tt]est[Rr]esult*/
+[Bb]uild[Ll]og.*
+
+# NUNIT
+*.VisualState.xml
+TestResult.xml
+
+# Build Results of an ATL Project
+[Dd]ebugPS/
+[Rr]eleasePS/
+dlldata.c
+
+# Benchmark Results
+BenchmarkDotNet.Artifacts/
+
+# .NET Core
+project.lock.json
+project.fragment.lock.json
+artifacts/
+**/Properties/launchSettings.json
+
+*_i.c
+*_p.c
+*_i.h
+*.ilk
+*.meta
+*.obj
+*.pch
+*.pdb
+*.pgc
+*.pgd
+*.rsp
+*.sbr
+*.tlb
+*.tli
+*.tlh
+*.tmp
+*.tmp_proj
+*.log
+*.vspscc
+*.vssscc
+.builds
+*.pidb
+*.svclog
+*.scc
+
+# Chutzpah Test files
+_Chutzpah*
+
+# Visual C++ cache files
+ipch/
+*.aps
+*.ncb
+*.opendb
+*.opensdf
+*.sdf
+*.cachefile
+*.VC.db
+*.VC.VC.opendb
+
+# Visual Studio profiler
+*.psess
+*.vsp
+*.vspx
+*.sap
+
+# Visual Studio Trace Files
+*.e2e
+
+# TFS 2012 Local Workspace
+$tf/
+
+# Guidance Automation Toolkit
+*.gpState
+
+# ReSharper is a .NET coding add-in
+_ReSharper*/
+*.[Rr]e[Ss]harper
+*.DotSettings.user
+
+# JustCode is a .NET coding add-in
+.JustCode
+
+# TeamCity is a build add-in
+_TeamCity*
+
+# DotCover is a Code Coverage Tool
+*.dotCover
+
+# AxoCover is a Code Coverage Tool
+.axoCover/*
+!.axoCover/settings.json
+
+# Visual Studio code coverage results
+*.coverage
+*.coveragexml
+
+# NCrunch
+_NCrunch_*
+.*crunch*.local.xml
+nCrunchTemp_*
+
+# MightyMoose
+*.mm.*
+AutoTest.Net/
+
+# Web workbench (sass)
+.sass-cache/
+
+# Installshield output folder
+[Ee]xpress/
+
+# DocProject is a documentation generator add-in
+DocProject/buildhelp/
+DocProject/Help/*.HxT
+DocProject/Help/*.HxC
+DocProject/Help/*.hhc
+DocProject/Help/*.hhk
+DocProject/Help/*.hhp
+DocProject/Help/Html2
+DocProject/Help/html
+
+# Click-Once directory
+publish/
+
+# Publish Web Output
+*.[Pp]ublish.xml
+*.azurePubxml
+# Note: Comment the next line if you want to checkin your web deploy settings,
+# but database connection strings (with potential passwords) will be unencrypted
+*.pubxml
+*.publishproj
+
+# Microsoft Azure Web App publish settings. Comment the next line if you want to
+# checkin your Azure Web App publish settings, but sensitive information contained
+# in these scripts will be unencrypted
+PublishScripts/
+
+# NuGet Packages
+*.nupkg
+# The packages folder can be ignored because of Package Restore
+**/packages/*
+# except build/, which is used as an MSBuild target.
+!**/packages/build/
+# Uncomment if necessary however generally it will be regenerated when needed
+#!**/packages/repositories.config
+# NuGet v3's project.json files produces more ignorable files
+*.nuget.props
+*.nuget.targets
+
+# Microsoft Azure Build Output
+csx/
+*.build.csdef
+
+# Microsoft Azure Emulator
+ecf/
+rcf/
+
+# Windows Store app package directories and files
+AppPackages/
+BundleArtifacts/
+Package.StoreAssociation.xml
+_pkginfo.txt
+*.appx
+
+# Visual Studio cache files
+# files ending in .cache can be ignored
+*.[Cc]ache
+# but keep track of directories ending in .cache
+!*.[Cc]ache/
+
+# Others
+ClientBin/
+~$*
+*~
+*.dbmdl
+*.dbproj.schemaview
+*.jfm
+*.pfx
+*.publishsettings
+orleans.codegen.cs
+
+# Since there are multiple workflows, uncomment next line to ignore bower_components
+# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
+#bower_components/
+
+# RIA/Silverlight projects
+Generated_Code/
+
+# Backup & report files from converting an old project file
+# to a newer Visual Studio version. Backup files are not needed,
+# because we have git ;-)
+_UpgradeReport_Files/
+Backup*/
+UpgradeLog*.XML
+UpgradeLog*.htm
+
+# SQL Server files
+*.mdf
+*.ldf
+*.ndf
+
+# Business Intelligence projects
+*.rdl.data
+*.bim.layout
+*.bim_*.settings
+
+# Microsoft Fakes
+FakesAssemblies/
+
+# GhostDoc plugin setting file
+*.GhostDoc.xml
+
+# Node.js Tools for Visual Studio
+.ntvs_analysis.dat
+node_modules/
+
+# Typescript v1 declaration files
+typings/
+
+# Visual Studio 6 build log
+*.plg
+
+# Visual Studio 6 workspace options file
+*.opt
+
+# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
+*.vbw
+
+# Visual Studio LightSwitch build output
+**/*.HTMLClient/GeneratedArtifacts
+**/*.DesktopClient/GeneratedArtifacts
+**/*.DesktopClient/ModelManifest.xml
+**/*.Server/GeneratedArtifacts
+**/*.Server/ModelManifest.xml
+_Pvt_Extensions
+
+# Paket dependency manager
+.paket/paket.exe
+paket-files/
+
+# FAKE - F# Make
+.fake/
+
+# JetBrains Rider
+.idea/
+*.sln.iml
+
+# CodeRush
+.cr/
+
+# Python Tools for Visual Studio (PTVS)
+__pycache__/
+*.pyc
+
+# Cake - Uncomment if you are using it
+# tools/**
+# !tools/packages.config
+
+# Tabs Studio
+*.tss
+
+# Telerik's JustMock configuration file
+*.jmconfig
+
+# BizTalk build output
+*.btp.cs
+*.btm.cs
+*.odx.cs
+*.xsd.cs
+
+# OpenCover UI analysis results
+OpenCover/
diff --git a/Source/Addins/MonoDevelop.GtkSharp.Addin.sln b/Source/Addins/MonoDevelop.GtkSharp.Addin.sln
new file mode 100644
index 000000000..88b9e8a3b
--- /dev/null
+++ b/Source/Addins/MonoDevelop.GtkSharp.Addin.sln
@@ -0,0 +1,17 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2012
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoDevelop.GtkSharp.Addin", "MonoDevelop.GtkSharp.Addin\MonoDevelop.GtkSharp.Addin.csproj", "{52AC8491-F6B7-4631-92BA-D5E95A091B74}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {52AC8491-F6B7-4631-92BA-D5E95A091B74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {52AC8491-F6B7-4631-92BA-D5E95A091B74}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {52AC8491-F6B7-4631-92BA-D5E95A091B74}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {52AC8491-F6B7-4631-92BA-D5E95A091B74}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+EndGlobal
diff --git a/Source/Addins/MonoDevelop.GtkSharp.Addin/CheckMissing.cs b/Source/Addins/MonoDevelop.GtkSharp.Addin/CheckMissing.cs
new file mode 100644
index 000000000..62e2ea873
--- /dev/null
+++ b/Source/Addins/MonoDevelop.GtkSharp.Addin/CheckMissing.cs
@@ -0,0 +1,12 @@
+using Mono.Addins;
+
+namespace MonoDevelop.GtkSharp.Addin
+{
+ public class CheckMissing : ConditionType
+ {
+ public override bool Evaluate(NodeElement conditionNode)
+ {
+ return AddinManager.GetExtensionNode("/MonoDevelop/Ide/ProjectTemplateCategories/crossplat/app") == null;
+ }
+ }
+}
diff --git a/Source/Addins/MonoDevelop.GtkSharp.Addin/GladeDesktopApplication.cs b/Source/Addins/MonoDevelop.GtkSharp.Addin/GladeDesktopApplication.cs
new file mode 100644
index 000000000..df6e38158
--- /dev/null
+++ b/Source/Addins/MonoDevelop.GtkSharp.Addin/GladeDesktopApplication.cs
@@ -0,0 +1,50 @@
+using System;
+using System.Diagnostics;
+using System.IO;
+using Microsoft.Win32;
+using MonoDevelop.Ide.Desktop;
+
+namespace MonoDevelop.GtkSharp.Addin
+{
+ public class GladeDesktopApplication : DesktopApplication
+ {
+ private static readonly string s_unixgladeapp = "-c '" + File.ReadAllText("glade.sh") + "'";
+
+ private readonly string _filename;
+
+ public GladeDesktopApplication(string filename) : base("GladeApp", "Glade", true)
+ {
+ _filename = filename;
+ }
+
+ public override void Launch(params string[] files)
+ {
+ try
+ {
+ var process = new Process();
+
+ if (Environment.OSVersion.Platform == PlatformID.Win32NT)
+ {
+ var location = Registry.GetValue(@"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall\GNOME Foundation Glade Interface Designer", "InstallLocation", "");
+ if (location != null)
+ {
+ process.StartInfo.FileName = Path.Combine(location.ToString(), "bin", "glade.exe");
+ process.StartInfo.Arguments = _filename;
+ }
+ }
+ else
+ {
+ process.StartInfo.FileName = "bash";
+ process.StartInfo.Arguments = s_unixgladeapp.Replace("$@", _filename);
+ }
+
+ if (!string.IsNullOrEmpty(process.StartInfo.FileName))
+ process.Start();
+ }
+ catch (Exception ex)
+ {
+ Console.WriteLine(ex);
+ }
+ }
+ }
+}
diff --git a/Source/Addins/MonoDevelop.GtkSharp.Addin/GladeDisplayBindings.cs b/Source/Addins/MonoDevelop.GtkSharp.Addin/GladeDisplayBindings.cs
new file mode 100644
index 000000000..476dc36f0
--- /dev/null
+++ b/Source/Addins/MonoDevelop.GtkSharp.Addin/GladeDisplayBindings.cs
@@ -0,0 +1,22 @@
+using MonoDevelop.Core;
+using MonoDevelop.Ide.Desktop;
+using MonoDevelop.Ide.Gui;
+using MonoDevelop.Projects;
+
+namespace MonoDevelop.GtkSharp.Addin
+{
+ public class GladeDisplayBinding : IExternalDisplayBinding
+ {
+ public bool CanUseAsDefault => true;
+
+ public bool CanHandle(FilePath fileName, string mimeType, Project ownerProject)
+ {
+ return fileName.Extension == ".glade";
+ }
+
+ public DesktopApplication GetApplication(FilePath fileName, string mimeType, Project ownerProject)
+ {
+ return new GladeDesktopApplication(fileName.FullPath);
+ }
+ }
+}
diff --git a/Source/Addins/MonoDevelop.GtkSharp.Addin/MonoDevelop.GtkSharp.Addin.csproj b/Source/Addins/MonoDevelop.GtkSharp.Addin/MonoDevelop.GtkSharp.Addin.csproj
new file mode 100644
index 000000000..2f403d16b
--- /dev/null
+++ b/Source/Addins/MonoDevelop.GtkSharp.Addin/MonoDevelop.GtkSharp.Addin.csproj
@@ -0,0 +1,96 @@
+
+
+
+ Debug
+ AnyCPU
+ {52AC8491-F6B7-4631-92BA-D5E95A091B74}
+ {86F6BF2A-E449-4B3E-813B-9ACC37E5545F};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ Library
+ MonoDevelop.GtkSharp.Addin
+ MonoDevelop.GtkSharp.Addin
+ v4.5
+
+
+ true
+ full
+ false
+ bin\Debug
+ DEBUG;
+ prompt
+ 4
+
+
+ true
+ bin\Release
+ prompt
+ 4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ glade.sh
+ PreserveNewest
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Source/Addins/MonoDevelop.GtkSharp.Addin/Properties/AddinInfo.cs b/Source/Addins/MonoDevelop.GtkSharp.Addin/Properties/AddinInfo.cs
new file mode 100644
index 000000000..daf24d056
--- /dev/null
+++ b/Source/Addins/MonoDevelop.GtkSharp.Addin/Properties/AddinInfo.cs
@@ -0,0 +1,10 @@
+using Mono.Addins;
+using Mono.Addins.Description;
+
+[assembly: Addin("MonoDevelop.GtkSharp.Addin", Version="1.0")]
+
+[assembly: AddinName("Gtk# Addin")]
+[assembly: AddinCategory("IDE extensions")]
+[assembly: AddinDescription("Provides modern Gtk# file / project templates and glade file integration.")]
+[assembly: AddinAuthor("cra0zy")]
+[assembly: AddinUrl("https://github.com/gtk-sharp/gtk-sharp")]
diff --git a/Source/Addins/MonoDevelop.GtkSharp.Addin/Properties/AssemblyInfo.cs b/Source/Addins/MonoDevelop.GtkSharp.Addin/Properties/AssemblyInfo.cs
new file mode 100644
index 000000000..4de068b3d
--- /dev/null
+++ b/Source/Addins/MonoDevelop.GtkSharp.Addin/Properties/AssemblyInfo.cs
@@ -0,0 +1,26 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+// Information about this assembly is defined by the following attributes.
+// Change them to the values specific to your project.
+
+[assembly: AssemblyTitle("MonoDevelop.GtkSharp.Addin")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("")]
+[assembly: AssemblyCopyright("${AuthorCopyright}")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
+// The form "{Major}.{Minor}.*" will automatically update the build and revision,
+// and "{Major}.{Minor}.{Build}.*" will update just the revision.
+
+[assembly: AssemblyVersion("1.0.*")]
+
+// The following attributes are used to specify the signing key for the assembly,
+// if desired. See the Mono documentation for more information about signing.
+
+//[assembly: AssemblyDelaySign(false)]
+//[assembly: AssemblyKeyFile("")]
diff --git a/Source/Addins/MonoDevelop.GtkSharp.Addin/Properties/Manifest.addin.xml b/Source/Addins/MonoDevelop.GtkSharp.Addin/Properties/Manifest.addin.xml
new file mode 100644
index 000000000..baa20f6fc
--- /dev/null
+++ b/Source/Addins/MonoDevelop.GtkSharp.Addin/Properties/Manifest.addin.xml
@@ -0,0 +1,57 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Source/Addins/MonoDevelop.GtkSharp.Addin/Templates/File/Data/Dialog.cs b/Source/Addins/MonoDevelop.GtkSharp.Addin/Templates/File/Data/Dialog.cs
new file mode 100644
index 000000000..49ac531d1
--- /dev/null
+++ b/Source/Addins/MonoDevelop.GtkSharp.Addin/Templates/File/Data/Dialog.cs
@@ -0,0 +1,23 @@
+using System;
+using Gtk;
+using UI = Gtk.Builder.ObjectAttribute;
+
+namespace ${Namespace}
+{
+ class ${EscapedIdentifier} : Dialog
+ {
+ public MyDialog() : this(new Builder("${Namespace}.${EscapedIdentifier}.glade")) { }
+
+ private MyDialog(Builder builder) : base(builder.GetObject("${EscapedIdentifier}").Handle)
+ {
+ DefaultResponse = ResponseType.Cancel;
+
+ Response += OnResponse;
+ }
+
+ private void OnResponse(object o, ResponseArgs args)
+ {
+ Hide();
+ }
+ }
+}
diff --git a/Source/Addins/MonoDevelop.GtkSharp.Addin/Templates/File/Data/Dialog.glade b/Source/Addins/MonoDevelop.GtkSharp.Addin/Templates/File/Data/Dialog.glade
new file mode 100644
index 000000000..c84dbfc9e
--- /dev/null
+++ b/Source/Addins/MonoDevelop.GtkSharp.Addin/Templates/File/Data/Dialog.glade
@@ -0,0 +1,51 @@
+
+
+
+
+
diff --git a/Source/Addins/MonoDevelop.GtkSharp.Addin/Templates/File/Data/Widget.cs b/Source/Addins/MonoDevelop.GtkSharp.Addin/Templates/File/Data/Widget.cs
new file mode 100644
index 000000000..f8fc3d1f9
--- /dev/null
+++ b/Source/Addins/MonoDevelop.GtkSharp.Addin/Templates/File/Data/Widget.cs
@@ -0,0 +1,16 @@
+using System;
+using Gtk;
+using UI = Gtk.Builder.ObjectAttribute;
+
+namespace ${Namespace}
+{
+ public class ${EscapedIdentifier} : Box
+ {
+ public ${EscapedIdentifier}() : this(new Builder("${Namespace}.${EscapedIdentifier}.glade")) { }
+
+ private ${EscapedIdentifier}(Builder builder) : base(builder.GetObject("${EscapedIdentifier}").Handle)
+ {
+
+ }
+ }
+}
diff --git a/Source/Addins/MonoDevelop.GtkSharp.Addin/Templates/File/Data/Widget.glade b/Source/Addins/MonoDevelop.GtkSharp.Addin/Templates/File/Data/Widget.glade
new file mode 100644
index 000000000..7a1be14d1
--- /dev/null
+++ b/Source/Addins/MonoDevelop.GtkSharp.Addin/Templates/File/Data/Widget.glade
@@ -0,0 +1,11 @@
+
+
+
+
+ True
+ False
+
+
+
+
+
diff --git a/Source/Addins/MonoDevelop.GtkSharp.Addin/Templates/File/Data/Window.cs b/Source/Addins/MonoDevelop.GtkSharp.Addin/Templates/File/Data/Window.cs
new file mode 100644
index 000000000..733fc24a6
--- /dev/null
+++ b/Source/Addins/MonoDevelop.GtkSharp.Addin/Templates/File/Data/Window.cs
@@ -0,0 +1,23 @@
+using System;
+using Gtk;
+using UI = Gtk.Builder.ObjectAttribute;
+
+namespace ${Namespace}
+{
+ class ${EscapedIdentifier} : Window
+ {
+ public ${EscapedIdentifier}() : this(new Builder("${Namespace}.${EscapedIdentifier}.glade")) { }
+
+ private ${EscapedIdentifier}(Builder builder) : base(builder.GetObject("${EscapedIdentifier}").Handle)
+ {
+ builder.Autoconnect(this);
+
+ DeleteEvent += OnDeleteEvent;
+ }
+
+ private void OnDeleteEvent(object sender, DeleteEventArgs a)
+ {
+ Application.Quit();
+ }
+ }
+}
diff --git a/Source/Addins/MonoDevelop.GtkSharp.Addin/Templates/File/Data/Window.glade b/Source/Addins/MonoDevelop.GtkSharp.Addin/Templates/File/Data/Window.glade
new file mode 100644
index 000000000..9c2ad5e00
--- /dev/null
+++ b/Source/Addins/MonoDevelop.GtkSharp.Addin/Templates/File/Data/Window.glade
@@ -0,0 +1,11 @@
+
+
+
+
+ False
+ ${Name}
+
+
+
+
+
diff --git a/Source/Addins/MonoDevelop.GtkSharp.Addin/Templates/File/Dialog.CS.xft.xml b/Source/Addins/MonoDevelop.GtkSharp.Addin/Templates/File/Dialog.CS.xft.xml
new file mode 100644
index 000000000..dcf56f5df
--- /dev/null
+++ b/Source/Addins/MonoDevelop.GtkSharp.Addin/Templates/File/Dialog.CS.xft.xml
@@ -0,0 +1,16 @@
+
+
+
+ <_Name>Dialog
+ md-gui-file
+ <_Category>Gtk#
+ C#
+ MyDialog
+ <_Description>Creates a new Gtk# dialog.
+
+
+
+
+
+
+
diff --git a/Source/Addins/MonoDevelop.GtkSharp.Addin/Templates/File/Widget.CS.xft.xml b/Source/Addins/MonoDevelop.GtkSharp.Addin/Templates/File/Widget.CS.xft.xml
new file mode 100644
index 000000000..d6e5416de
--- /dev/null
+++ b/Source/Addins/MonoDevelop.GtkSharp.Addin/Templates/File/Widget.CS.xft.xml
@@ -0,0 +1,16 @@
+
+
+
+ <_Name>Widget
+ md-gui-file
+ <_Category>Gtk#
+ C#
+ MyWidget
+ <_Description>Creates a new Gtk# custom widget.
+
+
+
+
+
+
+
diff --git a/Source/Addins/MonoDevelop.GtkSharp.Addin/Templates/File/Window.CS.xft.xml b/Source/Addins/MonoDevelop.GtkSharp.Addin/Templates/File/Window.CS.xft.xml
new file mode 100644
index 000000000..833f54b59
--- /dev/null
+++ b/Source/Addins/MonoDevelop.GtkSharp.Addin/Templates/File/Window.CS.xft.xml
@@ -0,0 +1,16 @@
+
+
+
+ <_Name>Window
+ md-gui-file
+ <_Category>Gtk#
+ C#
+ MyWindow
+ <_Description>Creates a new Gtk# window.
+
+
+
+
+
+
+
diff --git a/Source/Addins/MonoDevelop.GtkSharp.Addin/Templates/Projects/Data/MainWindow.cs b/Source/Addins/MonoDevelop.GtkSharp.Addin/Templates/Projects/Data/MainWindow.cs
new file mode 100644
index 000000000..8a143a946
--- /dev/null
+++ b/Source/Addins/MonoDevelop.GtkSharp.Addin/Templates/Projects/Data/MainWindow.cs
@@ -0,0 +1,37 @@
+using System;
+using Gtk;
+using UI = Gtk.Builder.ObjectAttribute;
+
+namespace ${Namespace}
+{
+ class MainWindow : Window
+ {
+#pragma warning disable 0649
+ [UI] private Label _label1;
+ [UI] private Button _button1;
+#pragma warning restore 0649
+
+ private int _counter;
+
+ public MainWindow() : this(new Builder("${Namespace}.MainWindow.glade")) { }
+
+ private MainWindow(Builder builder) : base(builder.GetObject("MainWindow").Handle)
+ {
+ builder.Autoconnect(this);
+
+ DeleteEvent += OnDeleteEvent;
+ _button1.Clicked += Button1_Clicked;
+ }
+
+ private void OnDeleteEvent(object sender, DeleteEventArgs a)
+ {
+ Application.Quit();
+ }
+
+ private void Button1_Clicked(object sender, EventArgs a)
+ {
+ _counter++;
+ _label1.Text = "Hello World! This button has been clicked " + _counter + " time(s).";
+ }
+ }
+}
diff --git a/Source/Addins/MonoDevelop.GtkSharp.Addin/Templates/Projects/Data/MainWindow.glade b/Source/Addins/MonoDevelop.GtkSharp.Addin/Templates/Projects/Data/MainWindow.glade
new file mode 100644
index 000000000..a13c41b20
--- /dev/null
+++ b/Source/Addins/MonoDevelop.GtkSharp.Addin/Templates/Projects/Data/MainWindow.glade
@@ -0,0 +1,46 @@
+
+
+
+
+ False
+ Example Window
+ 480
+ 240
+
+
+ True
+ False
+ 4
+ 4
+ 4
+ 4
+ vertical
+
+
+ True
+ False
+ Hello World!
+
+
+ True
+ True
+ 0
+
+
+
+
+ Click me!
+ True
+ False
+ True
+
+
+ False
+ True
+ 1
+
+
+
+
+
+
diff --git a/Source/Addins/MonoDevelop.GtkSharp.Addin/Templates/Projects/Data/Program.cs b/Source/Addins/MonoDevelop.GtkSharp.Addin/Templates/Projects/Data/Program.cs
new file mode 100644
index 000000000..d15fd862b
--- /dev/null
+++ b/Source/Addins/MonoDevelop.GtkSharp.Addin/Templates/Projects/Data/Program.cs
@@ -0,0 +1,23 @@
+using System;
+using Gtk;
+
+namespace ${Namespace}
+{
+ class Program
+ {
+ [STAThread]
+ public static void Main(string[] args)
+ {
+ Application.Init();
+
+ var app = new Application("org.gnome.example", GLib.ApplicationFlags.None);
+ app.Register(GLib.Cancellable.Current);
+
+ var win = new MainWindow();
+ app.AddWindow(win);
+
+ win.Show();
+ Application.Run();
+ }
+ }
+}
diff --git a/Source/Addins/MonoDevelop.GtkSharp.Addin/Templates/Projects/GtkSharpProject.CS.xpt.xml b/Source/Addins/MonoDevelop.GtkSharp.Addin/Templates/Projects/GtkSharpProject.CS.xpt.xml
new file mode 100644
index 000000000..dcbdb4b4b
--- /dev/null
+++ b/Source/Addins/MonoDevelop.GtkSharp.Addin/Templates/Projects/GtkSharpProject.CS.xpt.xml
@@ -0,0 +1,35 @@
+
+
+
+ <_Name>Gtk# Application
+ md-gui-project
+ <_Category>multiplat/app/gtk
+ C#
+
+ <_Description>Creates a new Gtk# multiplatform application.
+ gtk-project
+
+
+
+
+
+
+ ${ProjectName}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Source/Addins/MonoDevelop.GtkSharp.Addin/Templates/Projects/GtkSharpProject.FS.xpt.xml b/Source/Addins/MonoDevelop.GtkSharp.Addin/Templates/Projects/GtkSharpProject.FS.xpt.xml
new file mode 100644
index 000000000..763699ee3
--- /dev/null
+++ b/Source/Addins/MonoDevelop.GtkSharp.Addin/Templates/Projects/GtkSharpProject.FS.xpt.xml
@@ -0,0 +1,32 @@
+
+
+
+ <_Name>Gtk# Application
+ md-gui-project
+ <_Category>multiplat/app/gtk
+ F#
+
+ <_Description>Creates a new Gtk# multiplatform application.
+ gtk-project
+
+
+
+
+
+
+ ${ProjectName}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Source/Addins/MonoDevelop.GtkSharp.Addin/glade.sh b/Source/Addins/MonoDevelop.GtkSharp.Addin/glade.sh
new file mode 100755
index 000000000..c5bdf7bac
--- /dev/null
+++ b/Source/Addins/MonoDevelop.GtkSharp.Addin/glade.sh
@@ -0,0 +1,6 @@
+#!/bin/bash
+if [ -x "$(which glade)" ]; then
+ glade "$@"
+elif [ -x "$(which flatpak)" ] && [ ! -z "$(flatpak list | grep org.gnome.Glade)" ]; then
+ flatpak run org.gnome.Glade "$@"
+fi
\ No newline at end of file
diff --git a/Source/Addins/MonoDevelop.GtkSharp.Addin/packages.config b/Source/Addins/MonoDevelop.GtkSharp.Addin/packages.config
new file mode 100644
index 000000000..10589e6c7
--- /dev/null
+++ b/Source/Addins/MonoDevelop.GtkSharp.Addin/packages.config
@@ -0,0 +1,4 @@
+
+
+
+