From 38aafa4ab0a4ce91408a0f9ecf5ad4277c3a6f45 Mon Sep 17 00:00:00 2001 From: Curtis Wensley Date: Mon, 30 Nov 2020 11:19:24 -0800 Subject: [PATCH] Fix templates for VS 16.8 - Change Framework property to use tfm's. Fixes #1827 - Correctly show convertible types - Allow selecting a single framework - Default to net 5.0 - Fix creating file templates. Fixes #1811 - Remove Gtk2/3 options from templates - Fix loading wpf --- .../ProjectWizardPageModel.cs | 25 ++--- .../Eto.Addin.Shared/ProjectWizardPageView.cs | 16 ++- src/Addins/Eto.Addin.VisualStudio.sln | 5 + .../Eto.Addin.VisualStudio.csproj | 90 +++------------ .../Intellisense/XamlCompletionSource.cs | 66 ++++++----- .../Templates/App-CSharp/App.vstemplate | 1 - .../Templates/App-FSharp/App.vstemplate | 1 - .../Wizards/ProjectWizard.cs | 15 ++- src/Addins/Eto.Addin.VisualStudio/app.config | 2 +- .../Eto.Designer/Completion/TypeCompletion.cs | 35 ++++-- src/Addins/Eto.Designer/Eto.Designer.csproj | 1 + src/Addins/Eto.Designer/app.config | 2 +- .../Eto.Forms.Templates.csproj | 4 +- .../.template.config/dotnetcli.host.json | 9 +- .../App-CSharp/.template.config/template.json | 103 ++++++++---------- .../EtoApp.1.Desktop/EtoApp.1.Desktop.csproj | 4 +- .../App-CSharp/EtoApp.1.Desktop/Program.cs | 2 +- .../EtoApp.1.Gtk/EtoApp.1.Gtk.csproj | 11 +- .../App-CSharp/EtoApp.1.Gtk/Program.cs | 2 +- .../EtoApp.1.Mac/EtoApp.1.Mac.csproj | 11 +- .../App-CSharp/EtoApp.1.Mac/Program.cs | 2 +- .../EtoApp.1.WinForms.csproj | 5 +- .../App-CSharp/EtoApp.1.WinForms/Program.cs | 2 +- .../EtoApp.1.Wpf/EtoApp.1.Wpf.csproj | 5 +- .../App-CSharp/EtoApp.1.Wpf/Program.cs | 2 +- .../EtoApp.1.XamMac/EtoApp.1.XamMac.csproj | 2 +- .../App-CSharp/EtoApp.1.XamMac/Program.cs | 2 +- .../App-CSharp/EtoApp.1/EtoApp.1.csproj | 2 +- .../content/App-CSharp/EtoApp.1/MainForm.cs | 6 +- .../App-CSharp/EtoApp.1/MainForm.eto.cs | 6 +- .../content/App-CSharp/EtoApp.1/MainForm.jeto | 2 +- .../App-CSharp/EtoApp.1/MainForm.jeto.cs | 2 +- .../content/App-CSharp/EtoApp.1/MainForm.xeto | 2 +- .../App-CSharp/EtoApp.1/MainForm.xeto.cs | 2 +- .../.template.config/dotnetcli.host.json | 5 + .../App-FSharp/.template.config/template.json | 32 +++--- .../EtoApp.1.Desktop/EtoApp.1.Desktop.fsproj | 4 +- .../App-FSharp/EtoApp.1.Desktop/Program.fs | 4 +- .../EtoApp.1.Gtk/EtoApp.1.Gtk.fsproj | 6 +- .../App-FSharp/EtoApp.1.Gtk/Program.fs | 4 +- .../EtoApp.1.Mac/EtoApp.1.Mac.fsproj | 13 +-- .../App-FSharp/EtoApp.1.Mac/Program.fs | 4 +- .../EtoApp.1.WinForms.fsproj | 5 +- .../App-FSharp/EtoApp.1.WinForms/Program.fs | 4 +- .../EtoApp.1.Wpf/EtoApp.1.Wpf.fsproj | 5 +- .../App-FSharp/EtoApp.1.Wpf/Program.fs | 4 +- .../EtoApp.1.XamMac/EtoApp.1.XamMac.fsproj | 4 +- .../App-FSharp/EtoApp.1.XamMac/Program.fs | 4 +- .../App-FSharp/EtoApp.1/MainForm.eto.fs | 4 +- .../content/App-FSharp/EtoApp.1/MainForm.fs | 4 +- .../content/App-FSharp/EtoApp.1/MainForm.jeto | 2 +- .../App-FSharp/EtoApp.1/MainForm.jeto.fs | 2 +- .../content/App-FSharp/EtoApp.1/MainForm.xeto | 2 +- .../App-FSharp/EtoApp.1/MainForm.xeto.fs | 2 +- .../.template.config/template.json | 2 +- .../content/File-CSharp/MainForm.cs | 6 +- .../content/File-CSharp/MainForm.eto.cs | 6 +- .../content/File-CSharp/MainForm.jeto | 2 +- .../content/File-CSharp/MainForm.jeto.cs | 2 +- .../content/File-CSharp/MainForm.xeto | 2 +- .../content/File-CSharp/MainForm.xeto.cs | 2 +- .../.template.config/template.json | 2 +- .../content/File-FSharp/MainForm.eto.fs | 4 +- .../content/File-FSharp/MainForm.fs | 4 +- .../content/File-FSharp/MainForm.jeto | 2 +- .../content/File-FSharp/MainForm.jeto.fs | 2 +- .../content/File-FSharp/MainForm.xeto | 2 +- .../content/File-FSharp/MainForm.xeto.fs | 2 +- .../Eto.Serialization.Xaml.csproj | 2 +- src/Eto.Wpf/Forms/ApplicationHandler.cs | 6 + 70 files changed, 285 insertions(+), 324 deletions(-) mode change 100644 => 100755 src/Addins/Eto.Addin.Shared/ProjectWizardPageModel.cs mode change 100644 => 100755 src/Addins/Eto.Addin.Shared/ProjectWizardPageView.cs mode change 100644 => 100755 src/Addins/Eto.Addin.VisualStudio/Intellisense/XamlCompletionSource.cs mode change 100644 => 100755 src/Addins/Eto.Addin.VisualStudio/Wizards/ProjectWizard.cs mode change 100644 => 100755 src/Addins/Eto.Designer/Completion/TypeCompletion.cs mode change 100644 => 100755 src/Addins/Eto.Forms.Templates/Eto.Forms.Templates.csproj mode change 100644 => 100755 src/Addins/Eto.Forms.Templates/content/App-CSharp/.template.config/dotnetcli.host.json mode change 100644 => 100755 src/Addins/Eto.Forms.Templates/content/App-CSharp/.template.config/template.json mode change 100644 => 100755 src/Addins/Eto.Forms.Templates/content/App-CSharp/EtoApp.1.Desktop/EtoApp.1.Desktop.csproj mode change 100644 => 100755 src/Addins/Eto.Forms.Templates/content/App-CSharp/EtoApp.1.Desktop/Program.cs mode change 100644 => 100755 src/Addins/Eto.Forms.Templates/content/App-CSharp/EtoApp.1.Gtk/EtoApp.1.Gtk.csproj mode change 100644 => 100755 src/Addins/Eto.Forms.Templates/content/App-CSharp/EtoApp.1.Gtk/Program.cs mode change 100644 => 100755 src/Addins/Eto.Forms.Templates/content/App-CSharp/EtoApp.1.Mac/EtoApp.1.Mac.csproj mode change 100644 => 100755 src/Addins/Eto.Forms.Templates/content/App-CSharp/EtoApp.1.Mac/Program.cs mode change 100644 => 100755 src/Addins/Eto.Forms.Templates/content/App-CSharp/EtoApp.1.WinForms/Program.cs mode change 100644 => 100755 src/Addins/Eto.Forms.Templates/content/App-CSharp/EtoApp.1.Wpf/Program.cs mode change 100644 => 100755 src/Addins/Eto.Forms.Templates/content/App-CSharp/EtoApp.1.XamMac/EtoApp.1.XamMac.csproj mode change 100644 => 100755 src/Addins/Eto.Forms.Templates/content/App-CSharp/EtoApp.1.XamMac/Program.cs mode change 100644 => 100755 src/Addins/Eto.Forms.Templates/content/App-CSharp/EtoApp.1/EtoApp.1.csproj mode change 100644 => 100755 src/Addins/Eto.Forms.Templates/content/App-CSharp/EtoApp.1/MainForm.cs mode change 100644 => 100755 src/Addins/Eto.Forms.Templates/content/App-CSharp/EtoApp.1/MainForm.eto.cs mode change 100644 => 100755 src/Addins/Eto.Forms.Templates/content/App-CSharp/EtoApp.1/MainForm.jeto mode change 100644 => 100755 src/Addins/Eto.Forms.Templates/content/App-CSharp/EtoApp.1/MainForm.jeto.cs mode change 100644 => 100755 src/Addins/Eto.Forms.Templates/content/App-CSharp/EtoApp.1/MainForm.xeto mode change 100644 => 100755 src/Addins/Eto.Forms.Templates/content/App-CSharp/EtoApp.1/MainForm.xeto.cs mode change 100644 => 100755 src/Addins/Eto.Forms.Templates/content/App-FSharp/.template.config/dotnetcli.host.json mode change 100644 => 100755 src/Addins/Eto.Forms.Templates/content/App-FSharp/.template.config/template.json mode change 100644 => 100755 src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1.Desktop/EtoApp.1.Desktop.fsproj mode change 100644 => 100755 src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1.Desktop/Program.fs mode change 100644 => 100755 src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1.Gtk/EtoApp.1.Gtk.fsproj mode change 100644 => 100755 src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1.Gtk/Program.fs mode change 100644 => 100755 src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1.Mac/EtoApp.1.Mac.fsproj mode change 100644 => 100755 src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1.Mac/Program.fs mode change 100644 => 100755 src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1.WinForms/Program.fs mode change 100644 => 100755 src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1.Wpf/Program.fs mode change 100644 => 100755 src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1.XamMac/EtoApp.1.XamMac.fsproj mode change 100644 => 100755 src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1.XamMac/Program.fs mode change 100644 => 100755 src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1/MainForm.eto.fs mode change 100644 => 100755 src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1/MainForm.fs mode change 100644 => 100755 src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1/MainForm.jeto mode change 100644 => 100755 src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1/MainForm.jeto.fs mode change 100644 => 100755 src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1/MainForm.xeto mode change 100644 => 100755 src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1/MainForm.xeto.fs mode change 100644 => 100755 src/Addins/Eto.Forms.Templates/content/File-CSharp/.template.config/template.json mode change 100644 => 100755 src/Addins/Eto.Forms.Templates/content/File-CSharp/MainForm.cs mode change 100644 => 100755 src/Addins/Eto.Forms.Templates/content/File-CSharp/MainForm.eto.cs mode change 100644 => 100755 src/Addins/Eto.Forms.Templates/content/File-CSharp/MainForm.jeto mode change 100644 => 100755 src/Addins/Eto.Forms.Templates/content/File-CSharp/MainForm.jeto.cs mode change 100644 => 100755 src/Addins/Eto.Forms.Templates/content/File-CSharp/MainForm.xeto mode change 100644 => 100755 src/Addins/Eto.Forms.Templates/content/File-CSharp/MainForm.xeto.cs mode change 100644 => 100755 src/Addins/Eto.Forms.Templates/content/File-FSharp/.template.config/template.json mode change 100644 => 100755 src/Addins/Eto.Forms.Templates/content/File-FSharp/MainForm.eto.fs mode change 100644 => 100755 src/Addins/Eto.Forms.Templates/content/File-FSharp/MainForm.fs mode change 100644 => 100755 src/Addins/Eto.Forms.Templates/content/File-FSharp/MainForm.jeto mode change 100644 => 100755 src/Addins/Eto.Forms.Templates/content/File-FSharp/MainForm.jeto.fs mode change 100644 => 100755 src/Addins/Eto.Forms.Templates/content/File-FSharp/MainForm.xeto mode change 100644 => 100755 src/Addins/Eto.Forms.Templates/content/File-FSharp/MainForm.xeto.fs mode change 100644 => 100755 src/Eto.Wpf/Forms/ApplicationHandler.cs diff --git a/src/Addins/Eto.Addin.Shared/ProjectWizardPageModel.cs b/src/Addins/Eto.Addin.Shared/ProjectWizardPageModel.cs old mode 100644 new mode 100755 index ea1e6ccf54..78389847f8 --- a/src/Addins/Eto.Addin.Shared/ProjectWizardPageModel.cs +++ b/src/Addins/Eto.Addin.Shared/ProjectWizardPageModel.cs @@ -27,7 +27,7 @@ public ProjectWizardPageModel(IParameterSource source, XElement optionsElement) if (SupportsBase) Base = "Panel"; if (SupportsFramework) - SelectedFrameworks = new[] { SupportedFrameworks[0] }; + SelectedFramework = SupportedFrameworks[0]; } public bool IsValid @@ -40,7 +40,7 @@ public bool IsValid if (string.IsNullOrWhiteSpace(AppName) || AppNameInvalid) return false; } - if (SupportsFramework && !SelectedFrameworks.Any()) + if (SupportsFramework && SelectedFramework == null) return false; return true; } @@ -231,21 +231,21 @@ public class FrameworkInfo static readonly FrameworkInfo[] frameworkInformation = { - new FrameworkInfo { Text = "Full .NET Framework", Value = "full", CanUseCombined = true }, - new FrameworkInfo { Text = ".NET Core", Value = "core", CanUseCombined = false } + new FrameworkInfo { Text = ".NET 5", Value = "net5.0", CanUseCombined = false }, + new FrameworkInfo { Text = ".NET Core 3.1", Value = "netcoreapp3.1", CanUseCombined = false }, + new FrameworkInfo { Text = ".NET Framework 4.7.2 / Mono", Value = "net472", CanUseCombined = true }, }; - List _selectedFrameworks; + FrameworkInfo _selectedFramework; - public IEnumerable SelectedFrameworks + public FrameworkInfo SelectedFramework { - get => _selectedFrameworks ?? Enumerable.Empty(); + get => _selectedFramework; set { - _selectedFrameworks = (value?.OfType() ?? Enumerable.Empty()).ToList(); + _selectedFramework = value; - string parameterValue = _selectedFrameworks.Count == 1 ? _selectedFrameworks[0].Value : "both"; - Source.SetParameter("Framework", parameterValue); + Source.SetParameter("TargetFrameworkOverride", value.Value); if (!AllowCombined) Combined = false; @@ -255,7 +255,7 @@ public IEnumerable SelectedFrameworks } } - public bool AllowCombined => _selectedFrameworks?.All(r => r.CanUseCombined) == true; + public bool AllowCombined => _selectedFramework?.CanUseCombined == true; struct TypeInfo @@ -347,8 +347,7 @@ public string Information if (SupportsFramework) { - var frameworks = string.Join(" and ", _selectedFrameworks?.Select(r => r.Text) ?? Enumerable.Empty()); - text.Add($"For {frameworks} framework(s)."); + text.Add($"For {SelectedFramework.Text}."); } return string.Join("\n\n", text); diff --git a/src/Addins/Eto.Addin.Shared/ProjectWizardPageView.cs b/src/Addins/Eto.Addin.Shared/ProjectWizardPageView.cs old mode 100644 new mode 100755 index 360769745c..719ff6563a --- a/src/Addins/Eto.Addin.Shared/ProjectWizardPageView.cs +++ b/src/Addins/Eto.Addin.Shared/ProjectWizardPageView.cs @@ -97,13 +97,21 @@ public ProjectWizardPageView(ProjectWizardPageModel model) if (model.SupportsFramework) { + var frameworkDropDown = new DropDown(); + frameworkDropDown.BindDataContext(c => c.DataStore, (ProjectWizardPageModel m) => m.SupportedFrameworks); + frameworkDropDown.ItemTextBinding = Binding.Property((ProjectWizardPageModel.FrameworkInfo i) => i.Text); + frameworkDropDown.ItemKeyBinding = Binding.Property((ProjectWizardPageModel.FrameworkInfo i) => i.Value); + frameworkDropDown.SelectedValueBinding.BindDataContext((ProjectWizardPageModel m) => m.SelectedFramework); + + /* var frameworkCheckBoxes = new CheckBoxList(); frameworkCheckBoxes.BindDataContext(c => c.DataStore, (ProjectWizardPageModel m) => m.SupportedFrameworks); frameworkCheckBoxes.ItemTextBinding = Binding.Property((ProjectWizardPageModel.FrameworkInfo i) => i.Text); frameworkCheckBoxes.ItemKeyBinding = Binding.Property((ProjectWizardPageModel.FrameworkInfo i) => i.Value); frameworkCheckBoxes.SelectedValuesBinding.BindDataContext((ProjectWizardPageModel m) => m.SelectedFrameworks); + */ - content.AddRow(HeadingLabel("Framework:"), frameworkCheckBoxes); + content.AddRow(HeadingLabel("Framework:"), frameworkDropDown); } if (model.SupportsProjectType) @@ -179,9 +187,9 @@ public ProjectWizardPageView(ProjectWizardPageModel model) } #if DEBUG - var showColorsButton = new Button { Text = "Show all themed colors" }; - showColorsButton.Click += (sender, e) => new ThemedColorsDialog().ShowModal(this); - content.AddRow(new Panel(), showColorsButton); + //var showColorsButton = new Button { Text = "Show all themed colors" }; + //showColorsButton.Click += (sender, e) => new ThemedColorsDialog().ShowModal(this); + //content.AddRow(new Panel(), showColorsButton); #endif var informationLabel = new Label(); diff --git a/src/Addins/Eto.Addin.VisualStudio.sln b/src/Addins/Eto.Addin.VisualStudio.sln index 5c75857649..08ed5596e9 100644 --- a/src/Addins/Eto.Addin.VisualStudio.sln +++ b/src/Addins/Eto.Addin.VisualStudio.sln @@ -19,6 +19,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Eto.Serialization.Xaml", ". EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Eto.Forms.Templates", "Eto.Forms.Templates\Eto.Forms.Templates.csproj", "{F3B5405C-64C3-4EEE-B32E-C028F48DB745}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{F132CF00-BA1F-41E0-BFD9-0F691C47C5FE}" + ProjectSection(SolutionItems) = preProject + ..\..\build\Common.props = ..\..\build\Common.props + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU diff --git a/src/Addins/Eto.Addin.VisualStudio/Eto.Addin.VisualStudio.csproj b/src/Addins/Eto.Addin.VisualStudio/Eto.Addin.VisualStudio.csproj index 6c0b556f28..2df4de8202 100755 --- a/src/Addins/Eto.Addin.VisualStudio/Eto.Addin.VisualStudio.csproj +++ b/src/Addins/Eto.Addin.VisualStudio/Eto.Addin.VisualStudio.csproj @@ -27,6 +27,7 @@ true Eto.Addin.VisualStudio-$(PackageVersion).vsix + True Program @@ -190,83 +191,13 @@ - - True - False - - - True - False - - False - - - False - - - False - - - False - - - False - - - False - - - False - - - False - - - True - - - True - - - True - - - True - - - False - - - False - False - - False - - - False - - - False - - - False - - - False - - - False - - - False - @@ -283,9 +214,6 @@ - - True - @@ -301,11 +229,16 @@ - - + + - - + + compile; build; native; contentfiles; analyzers; buildtransitive + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + @@ -336,6 +269,9 @@ + + + Title="My Eto Form" - ClientSize="400, 350" + MinimumSize="200,200" Padding="10" > diff --git a/src/Addins/Eto.Forms.Templates/content/App-CSharp/EtoApp.1/MainForm.xeto.cs b/src/Addins/Eto.Forms.Templates/content/App-CSharp/EtoApp.1/MainForm.xeto.cs old mode 100644 new mode 100755 index 0e96c5edca..573e918402 --- a/src/Addins/Eto.Forms.Templates/content/App-CSharp/EtoApp.1/MainForm.xeto.cs +++ b/src/Addins/Eto.Forms.Templates/content/App-CSharp/EtoApp.1/MainForm.xeto.cs @@ -5,7 +5,7 @@ using Eto.Drawing; using Eto.Serialization.Xaml; -namespace EtoApp._1 +namespace EtoApp.1 { public class MainForm : Form { diff --git a/src/Addins/Eto.Forms.Templates/content/App-FSharp/.template.config/dotnetcli.host.json b/src/Addins/Eto.Forms.Templates/content/App-FSharp/.template.config/dotnetcli.host.json old mode 100644 new mode 100755 index e66424e2d7..961e8e55c2 --- a/src/Addins/Eto.Forms.Templates/content/App-FSharp/.template.config/dotnetcli.host.json +++ b/src/Addins/Eto.Forms.Templates/content/App-FSharp/.template.config/dotnetcli.host.json @@ -13,6 +13,11 @@ "longName": "combined", "shortName": "c" }, + "TargetFrameworkOverride": { + "isHidden": "true", + "longName": "target-framework-override", + "shortName": "" + }, "Framework": { "longName": "framework", "shortName": "f" diff --git a/src/Addins/Eto.Forms.Templates/content/App-FSharp/.template.config/template.json b/src/Addins/Eto.Forms.Templates/content/App-FSharp/.template.config/template.json old mode 100644 new mode 100755 index 605d71f004..e6cc12a262 --- a/src/Addins/Eto.Forms.Templates/content/App-FSharp/.template.config/template.json +++ b/src/Addins/Eto.Forms.Templates/content/App-FSharp/.template.config/template.json @@ -86,23 +86,31 @@ "dataType": "bool", "defaultValue": "false" }, + "TargetFrameworkOverride": { + "type": "parameter", + "description": "Overrides the target framework", + "replaces": "TargetFrameworkOverride", + "datatype": "string", + "defaultValue": "" + }, "Framework": { "type": "parameter", "description": "Specify the framework(s) to support", "dataType": "choice", - "defaultValue": "core", + "defaultValue": "net5.0", + "replaces": "net5.0", "choices": [ { - "choice": "full", - "description": "Full .NET Framework and/or Mono" + "choice": "net5.0", + "description": ".NET 5.0" }, { - "choice": "core", - "description": ".NET Core" + "choice": "netcoreapp3.1", + "description": ".NET Core 3.1" }, { - "choice": "both", - "description": "Target both .NET Core and .NET Framework / Mono" + "choice": "net462", + "description": ".NET Framework 4.6.2 / Mono" } ] }, @@ -141,16 +149,6 @@ "parameters": { "format": "yyyy" } - }, - /* Support SDK 2.0.0 */ - "namespace-for-old-sdk": { - "type": "generated", - "generator": "coalesce", - "parameters": { - "sourceVariableName": "safe_namespace", - "fallbackVariableName": "safe_name" - }, - "replaces": "EtoApp._1" } }, "sources": [ diff --git a/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1.Desktop/EtoApp.1.Desktop.fsproj b/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1.Desktop/EtoApp.1.Desktop.fsproj old mode 100644 new mode 100755 index 8ac49011b6..4cde8f840b --- a/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1.Desktop/EtoApp.1.Desktop.fsproj +++ b/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1.Desktop/EtoApp.1.Desktop.fsproj @@ -2,8 +2,8 @@ WinExe - net472 - $(AssemblySearchPaths);{GAC} + net5.0 + TargetFrameworkOverride diff --git a/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1.Desktop/Program.fs b/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1.Desktop/Program.fs old mode 100644 new mode 100755 index f4c16507df..7460f5c9d1 --- a/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1.Desktop/Program.fs +++ b/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1.Desktop/Program.fs @@ -1,8 +1,8 @@ -namespace EtoApp._1.Desktop +namespace EtoApp.1.Desktop module Program = open System - open EtoApp._1 + open EtoApp.1 [] [] diff --git a/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1.Gtk/EtoApp.1.Gtk.fsproj b/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1.Gtk/EtoApp.1.Gtk.fsproj old mode 100644 new mode 100755 index fdc3849775..8a4f85268f --- a/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1.Gtk/EtoApp.1.Gtk.fsproj +++ b/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1.Gtk/EtoApp.1.Gtk.fsproj @@ -2,10 +2,8 @@ WinExe - net472 - netcoreapp3.1 - net472;netcoreapp3.1 - $(AssemblySearchPaths);{GAC} + net5.0 + TargetFrameworkOverride diff --git a/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1.Gtk/Program.fs b/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1.Gtk/Program.fs old mode 100644 new mode 100755 index 6361f8327a..97faca8d5e --- a/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1.Gtk/Program.fs +++ b/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1.Gtk/Program.fs @@ -1,8 +1,8 @@ -namespace EtoApp._1.Gtk +namespace EtoApp.1.Gtk module Program = open System - open EtoApp._1 + open EtoApp.1 [] [] diff --git a/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1.Mac/EtoApp.1.Mac.fsproj b/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1.Mac/EtoApp.1.Mac.fsproj old mode 100644 new mode 100755 index 2a0b3fe99d..8486f8627d --- a/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1.Mac/EtoApp.1.Mac.fsproj +++ b/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1.Mac/EtoApp.1.Mac.fsproj @@ -1,22 +1,17 @@  - WinExe - net472 - netcoreapp3.1 - net472;netcoreapp3.1 + Exe + net5.0 + TargetFrameworkOverride - osx-x64 + osx-x64 - - - - diff --git a/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1.Mac/Program.fs b/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1.Mac/Program.fs old mode 100644 new mode 100755 index 8837a010da..0f8f4bd220 --- a/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1.Mac/Program.fs +++ b/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1.Mac/Program.fs @@ -1,8 +1,8 @@ -namespace EtoApp._1.Mac +namespace EtoApp.1.Mac module Program = open System - open EtoApp._1 + open EtoApp.1 [] [] diff --git a/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1.WinForms/EtoApp.1.WinForms.fsproj b/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1.WinForms/EtoApp.1.WinForms.fsproj index 234baca4f4..c6828b9ae2 100755 --- a/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1.WinForms/EtoApp.1.WinForms.fsproj +++ b/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1.WinForms/EtoApp.1.WinForms.fsproj @@ -2,9 +2,8 @@ WinExe - net472 - netcoreapp3.1 - net472;netcoreapp3.1 + net5.0 + TargetFrameworkOverride diff --git a/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1.WinForms/Program.fs b/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1.WinForms/Program.fs old mode 100644 new mode 100755 index 49f649bfb9..22cd0882c6 --- a/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1.WinForms/Program.fs +++ b/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1.WinForms/Program.fs @@ -1,8 +1,8 @@ -namespace EtoApp._1.WinForms +namespace EtoApp.1.WinForms module Program = open System - open EtoApp._1 + open EtoApp.1 [] [] diff --git a/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1.Wpf/EtoApp.1.Wpf.fsproj b/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1.Wpf/EtoApp.1.Wpf.fsproj index 0b3b74ac5a..198f046b52 100755 --- a/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1.Wpf/EtoApp.1.Wpf.fsproj +++ b/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1.Wpf/EtoApp.1.Wpf.fsproj @@ -2,9 +2,8 @@ WinExe - net472 - netcoreapp3.1 - net472;netcoreapp3.1 + net5.0 + TargetFrameworkOverride diff --git a/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1.Wpf/Program.fs b/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1.Wpf/Program.fs old mode 100644 new mode 100755 index 813511a142..14920b99e0 --- a/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1.Wpf/Program.fs +++ b/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1.Wpf/Program.fs @@ -1,8 +1,8 @@ -namespace EtoApp._1.Wpf +namespace EtoApp.1.Wpf module Program = open System - open EtoApp._1 + open EtoApp.1 [] [] diff --git a/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1.XamMac/EtoApp.1.XamMac.fsproj b/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1.XamMac/EtoApp.1.XamMac.fsproj old mode 100644 new mode 100755 index 407f4e1399..fe5769408f --- a/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1.XamMac/EtoApp.1.XamMac.fsproj +++ b/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1.XamMac/EtoApp.1.XamMac.fsproj @@ -7,7 +7,7 @@ {A3F8F2AB-B479-4A4A-A458-A89E7DC349F1};{F2A71F9B-5D33-465A-A702-920D77279786} true Exe - EtoApp._1.XamMac + EtoApp.1.XamMac EtoApp.1.XamMac v2.0 Xamarin.Mac @@ -87,7 +87,7 @@ 2.5.8-dev - 4.7.0 + 5.0.0 diff --git a/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1.XamMac/Program.fs b/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1.XamMac/Program.fs old mode 100644 new mode 100755 index a61ee57dc3..96fa1d2435 --- a/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1.XamMac/Program.fs +++ b/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1.XamMac/Program.fs @@ -1,8 +1,8 @@ -namespace EtoApp._1.XamMac +namespace EtoApp.1.XamMac module Program = open System - open EtoApp._1 + open EtoApp.1 [] [] diff --git a/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1/MainForm.eto.fs b/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1/MainForm.eto.fs old mode 100644 new mode 100755 index 49877a0dea..465d753058 --- a/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1/MainForm.eto.fs +++ b/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1/MainForm.eto.fs @@ -1,5 +1,5 @@ #if (UseCodePreview) -namespace EtoApp._1 +namespace EtoApp.1 open System open Eto.Forms @@ -10,7 +10,7 @@ type MainFormBase () = member this.InitializeComponent() = #if IsWindow base.Title <- "My Eto Form" - base.ClientSize <- new Size(400, 350) + base.MinimumSize <- new Size(200, 200) #endif // table with three rows diff --git a/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1/MainForm.fs b/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1/MainForm.fs old mode 100644 new mode 100755 index af735ffa56..3aedd3e716 --- a/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1/MainForm.fs +++ b/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1/MainForm.fs @@ -1,5 +1,5 @@ #if (UseCode || UseCodePreview) -namespace EtoApp._1 +namespace EtoApp.1 open System open Eto.Forms @@ -15,7 +15,7 @@ type MainForm () as this = do #if IsWindow base.Title <- "My Eto Form" - base.ClientSize <- new Size(400, 350) + base.MinimumSize <- new Size(200, 200) #endif // table with three rows diff --git a/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1/MainForm.jeto b/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1/MainForm.jeto old mode 100644 new mode 100755 index 192d92e40c..4a1d2c6bfc --- a/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1/MainForm.jeto +++ b/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1/MainForm.jeto @@ -2,7 +2,7 @@ "$type": "Form", /*#if(IsWindow)*/ "Title": "My Eto Form", - "ClientSize": "400,350", + "MinimumSize": "200,200", /*#endif */ "Padding": "10", "Content": { diff --git a/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1/MainForm.jeto.fs b/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1/MainForm.jeto.fs old mode 100644 new mode 100755 index 08bdb07c19..c56069b1c8 --- a/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1/MainForm.jeto.fs +++ b/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1/MainForm.jeto.fs @@ -1,5 +1,5 @@ #if (UseJeto) -namespace EtoApp._1 +namespace EtoApp.1 open System open Eto.Forms diff --git a/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1/MainForm.xeto b/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1/MainForm.xeto old mode 100644 new mode 100755 index ba29fe2261..2ee9fdf705 --- a/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1/MainForm.xeto +++ b/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1/MainForm.xeto @@ -4,7 +4,7 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="My Eto Form" - ClientSize="400, 350" + MinimumSize="200,200" Padding="10" > diff --git a/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1/MainForm.xeto.fs b/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1/MainForm.xeto.fs old mode 100644 new mode 100755 index 4ca990ef72..07da508a71 --- a/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1/MainForm.xeto.fs +++ b/src/Addins/Eto.Forms.Templates/content/App-FSharp/EtoApp.1/MainForm.xeto.fs @@ -1,5 +1,5 @@ #if (UseXeto) -namespace EtoApp._1 +namespace EtoApp.1 open System open Eto.Forms diff --git a/src/Addins/Eto.Forms.Templates/content/File-CSharp/.template.config/template.json b/src/Addins/Eto.Forms.Templates/content/File-CSharp/.template.config/template.json old mode 100644 new mode 100755 index d8175a3231..6ac5c36f4b --- a/src/Addins/Eto.Forms.Templates/content/File-CSharp/.template.config/template.json +++ b/src/Addins/Eto.Forms.Templates/content/File-CSharp/.template.config/template.json @@ -65,7 +65,7 @@ }, "Namespace": { "description": "Namespace for the generated files", - "replaces": "EtoApp._1", + "replaces": "EtoApp.1", "defaultValue": "EtoApp", "type": "parameter" }, diff --git a/src/Addins/Eto.Forms.Templates/content/File-CSharp/MainForm.cs b/src/Addins/Eto.Forms.Templates/content/File-CSharp/MainForm.cs old mode 100644 new mode 100755 index 7fc5ee62ed..8f28499fa5 --- a/src/Addins/Eto.Forms.Templates/content/File-CSharp/MainForm.cs +++ b/src/Addins/Eto.Forms.Templates/content/File-CSharp/MainForm.cs @@ -1,9 +1,9 @@ -#if (UseCode || UseCodePreview) +#if (UseCode || UseCodePreview) using System; using Eto.Forms; using Eto.Drawing; -namespace EtoApp._1 +namespace EtoApp.1 { public partial class MainForm : Form { @@ -14,7 +14,7 @@ public MainForm() #else #if IsWindow Title = "My Eto Form"; - ClientSize = new Size(400, 350); + MinimumSize = new Size(200, 200); #endif Content = new StackLayout diff --git a/src/Addins/Eto.Forms.Templates/content/File-CSharp/MainForm.eto.cs b/src/Addins/Eto.Forms.Templates/content/File-CSharp/MainForm.eto.cs old mode 100644 new mode 100755 index 266e0b3773..77bf621b84 --- a/src/Addins/Eto.Forms.Templates/content/File-CSharp/MainForm.eto.cs +++ b/src/Addins/Eto.Forms.Templates/content/File-CSharp/MainForm.eto.cs @@ -1,9 +1,9 @@ -#if (UseCodePreview) +#if (UseCodePreview) using System; using Eto.Forms; using Eto.Drawing; -namespace EtoApp._1 +namespace EtoApp.1 { partial class MainForm : Form { @@ -11,7 +11,7 @@ void InitializeComponent() { #if IsWindow Title = "My Eto Form"; - ClientSize = new Size(400, 350); + MinimumSize = new Size(200, 200); #endif Padding = 10; diff --git a/src/Addins/Eto.Forms.Templates/content/File-CSharp/MainForm.jeto b/src/Addins/Eto.Forms.Templates/content/File-CSharp/MainForm.jeto old mode 100644 new mode 100755 index 192d92e40c..4a1d2c6bfc --- a/src/Addins/Eto.Forms.Templates/content/File-CSharp/MainForm.jeto +++ b/src/Addins/Eto.Forms.Templates/content/File-CSharp/MainForm.jeto @@ -2,7 +2,7 @@ "$type": "Form", /*#if(IsWindow)*/ "Title": "My Eto Form", - "ClientSize": "400,350", + "MinimumSize": "200,200", /*#endif */ "Padding": "10", "Content": { diff --git a/src/Addins/Eto.Forms.Templates/content/File-CSharp/MainForm.jeto.cs b/src/Addins/Eto.Forms.Templates/content/File-CSharp/MainForm.jeto.cs old mode 100644 new mode 100755 index c5c37514c7..d689c5a8ed --- a/src/Addins/Eto.Forms.Templates/content/File-CSharp/MainForm.jeto.cs +++ b/src/Addins/Eto.Forms.Templates/content/File-CSharp/MainForm.jeto.cs @@ -5,7 +5,7 @@ using Eto.Drawing; using Eto.Serialization.Json; -namespace EtoApp._1 +namespace EtoApp.1 { public class MainForm : Form { diff --git a/src/Addins/Eto.Forms.Templates/content/File-CSharp/MainForm.xeto b/src/Addins/Eto.Forms.Templates/content/File-CSharp/MainForm.xeto old mode 100644 new mode 100755 index ba29fe2261..2ee9fdf705 --- a/src/Addins/Eto.Forms.Templates/content/File-CSharp/MainForm.xeto +++ b/src/Addins/Eto.Forms.Templates/content/File-CSharp/MainForm.xeto @@ -4,7 +4,7 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="My Eto Form" - ClientSize="400, 350" + MinimumSize="200,200" Padding="10" > diff --git a/src/Addins/Eto.Forms.Templates/content/File-CSharp/MainForm.xeto.cs b/src/Addins/Eto.Forms.Templates/content/File-CSharp/MainForm.xeto.cs old mode 100644 new mode 100755 index 0e96c5edca..573e918402 --- a/src/Addins/Eto.Forms.Templates/content/File-CSharp/MainForm.xeto.cs +++ b/src/Addins/Eto.Forms.Templates/content/File-CSharp/MainForm.xeto.cs @@ -5,7 +5,7 @@ using Eto.Drawing; using Eto.Serialization.Xaml; -namespace EtoApp._1 +namespace EtoApp.1 { public class MainForm : Form { diff --git a/src/Addins/Eto.Forms.Templates/content/File-FSharp/.template.config/template.json b/src/Addins/Eto.Forms.Templates/content/File-FSharp/.template.config/template.json old mode 100644 new mode 100755 index 9428c640ca..8ba1ab7a02 --- a/src/Addins/Eto.Forms.Templates/content/File-FSharp/.template.config/template.json +++ b/src/Addins/Eto.Forms.Templates/content/File-FSharp/.template.config/template.json @@ -65,7 +65,7 @@ }, "Namespace": { "description": "Namespace for the generated files", - "replaces": "EtoApp._1", + "replaces": "EtoApp.1", "defaultValue": "EtoApp", "type": "parameter" }, diff --git a/src/Addins/Eto.Forms.Templates/content/File-FSharp/MainForm.eto.fs b/src/Addins/Eto.Forms.Templates/content/File-FSharp/MainForm.eto.fs old mode 100644 new mode 100755 index 49877a0dea..465d753058 --- a/src/Addins/Eto.Forms.Templates/content/File-FSharp/MainForm.eto.fs +++ b/src/Addins/Eto.Forms.Templates/content/File-FSharp/MainForm.eto.fs @@ -1,5 +1,5 @@ #if (UseCodePreview) -namespace EtoApp._1 +namespace EtoApp.1 open System open Eto.Forms @@ -10,7 +10,7 @@ type MainFormBase () = member this.InitializeComponent() = #if IsWindow base.Title <- "My Eto Form" - base.ClientSize <- new Size(400, 350) + base.MinimumSize <- new Size(200, 200) #endif // table with three rows diff --git a/src/Addins/Eto.Forms.Templates/content/File-FSharp/MainForm.fs b/src/Addins/Eto.Forms.Templates/content/File-FSharp/MainForm.fs old mode 100644 new mode 100755 index af735ffa56..3aedd3e716 --- a/src/Addins/Eto.Forms.Templates/content/File-FSharp/MainForm.fs +++ b/src/Addins/Eto.Forms.Templates/content/File-FSharp/MainForm.fs @@ -1,5 +1,5 @@ #if (UseCode || UseCodePreview) -namespace EtoApp._1 +namespace EtoApp.1 open System open Eto.Forms @@ -15,7 +15,7 @@ type MainForm () as this = do #if IsWindow base.Title <- "My Eto Form" - base.ClientSize <- new Size(400, 350) + base.MinimumSize <- new Size(200, 200) #endif // table with three rows diff --git a/src/Addins/Eto.Forms.Templates/content/File-FSharp/MainForm.jeto b/src/Addins/Eto.Forms.Templates/content/File-FSharp/MainForm.jeto old mode 100644 new mode 100755 index 192d92e40c..4a1d2c6bfc --- a/src/Addins/Eto.Forms.Templates/content/File-FSharp/MainForm.jeto +++ b/src/Addins/Eto.Forms.Templates/content/File-FSharp/MainForm.jeto @@ -2,7 +2,7 @@ "$type": "Form", /*#if(IsWindow)*/ "Title": "My Eto Form", - "ClientSize": "400,350", + "MinimumSize": "200,200", /*#endif */ "Padding": "10", "Content": { diff --git a/src/Addins/Eto.Forms.Templates/content/File-FSharp/MainForm.jeto.fs b/src/Addins/Eto.Forms.Templates/content/File-FSharp/MainForm.jeto.fs old mode 100644 new mode 100755 index 08bdb07c19..c56069b1c8 --- a/src/Addins/Eto.Forms.Templates/content/File-FSharp/MainForm.jeto.fs +++ b/src/Addins/Eto.Forms.Templates/content/File-FSharp/MainForm.jeto.fs @@ -1,5 +1,5 @@ #if (UseJeto) -namespace EtoApp._1 +namespace EtoApp.1 open System open Eto.Forms diff --git a/src/Addins/Eto.Forms.Templates/content/File-FSharp/MainForm.xeto b/src/Addins/Eto.Forms.Templates/content/File-FSharp/MainForm.xeto old mode 100644 new mode 100755 index ba29fe2261..2ee9fdf705 --- a/src/Addins/Eto.Forms.Templates/content/File-FSharp/MainForm.xeto +++ b/src/Addins/Eto.Forms.Templates/content/File-FSharp/MainForm.xeto @@ -4,7 +4,7 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="My Eto Form" - ClientSize="400, 350" + MinimumSize="200,200" Padding="10" > diff --git a/src/Addins/Eto.Forms.Templates/content/File-FSharp/MainForm.xeto.fs b/src/Addins/Eto.Forms.Templates/content/File-FSharp/MainForm.xeto.fs old mode 100644 new mode 100755 index 4ca990ef72..07da508a71 --- a/src/Addins/Eto.Forms.Templates/content/File-FSharp/MainForm.xeto.fs +++ b/src/Addins/Eto.Forms.Templates/content/File-FSharp/MainForm.xeto.fs @@ -1,5 +1,5 @@ #if (UseXeto) -namespace EtoApp._1 +namespace EtoApp.1 open System open Eto.Forms diff --git a/src/Eto.Serialization.Xaml/Eto.Serialization.Xaml.csproj b/src/Eto.Serialization.Xaml/Eto.Serialization.Xaml.csproj index 2296884cac..4eb20535a1 100644 --- a/src/Eto.Serialization.Xaml/Eto.Serialization.Xaml.csproj +++ b/src/Eto.Serialization.Xaml/Eto.Serialization.Xaml.csproj @@ -29,7 +29,7 @@ https://github.com/picoe/Eto/wiki - + diff --git a/src/Eto.Wpf/Forms/ApplicationHandler.cs b/src/Eto.Wpf/Forms/ApplicationHandler.cs old mode 100644 new mode 100755 index 8c2d34c08f..7e37ff020c --- a/src/Eto.Wpf/Forms/ApplicationHandler.cs +++ b/src/Eto.Wpf/Forms/ApplicationHandler.cs @@ -76,6 +76,12 @@ void ApplyThemes() if (!EnableCustomThemes) return; + // ensure the Xceed.Wpf.Toolkit assembly is loaded here. + // kind of pointless, but adding the resource dictionary below fails unless this assembly is loaded.. + var xceedWpfToolkit = typeof(Xceed.Wpf.Toolkit.ButtonSpinner).Assembly; + if (xceedWpfToolkit == null) + throw new InvalidOperationException("Could not load Xceed.Wpf.Toolkit"); + // Add themes to our controls var assemblyName = typeof(ApplicationHandler).Assembly.GetName().Name; Control.Resources.MergedDictionaries.Add(new sw.ResourceDictionary { Source = new Uri($"pack://application:,,,/{assemblyName};component/themes/generic.xaml", UriKind.RelativeOrAbsolute) });