From 775a59ea75e960edbb7bf1978a693d1074500055 Mon Sep 17 00:00:00 2001 From: Noah Sherwin Date: Tue, 4 Jul 2023 21:31:01 -0700 Subject: [PATCH 01/19] chore(vscode): set dotnet.defaultSolution; disable cmake.configureOnOpen --- .vscode/settings.json | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..46d6f21 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,4 @@ +{ + "dotnet.defaultSolution": "GroupBox.sln", + "cmake.configureOnOpen": false +} From 8ff736c1edf3809d9a807e4941e3b05e65013214 Mon Sep 17 00:00:00 2001 From: Noah Sherwin Date: Wed, 5 Jul 2023 02:28:03 -0700 Subject: [PATCH 02/19] build(groupbox, deps, sample, vscode): upgrade Avalonia to 11.0.0-rc2.2 - build: project 'Sample' now targets .NET 6.0. .NET Core 3.1 is out of support. - refactor: AppBuilder extension LogToDebug is now LogToTrace - build(deps): Avalonia's requested version is now defined in Directory.Build.props - build: remove nuget.config BREAKING CHANGE: - build(deps): all consumers of Avalonia.GroupBox must target Avalonia 11.0.0-rc2.2 or later. --- .vscode/launch.json | 4 +- Directory.Build.props | 10 +++++ GroupBox.sln | 95 ++++++++++++++++++++-------------------- GroupBox/GroupBox.csproj | 9 ++-- Sample/Program.cs | 4 +- Sample/Sample.csproj | 19 +++----- Sample/nuget.config | 6 --- 7 files changed, 70 insertions(+), 77 deletions(-) create mode 100644 Directory.Build.props delete mode 100644 Sample/nuget.config diff --git a/.vscode/launch.json b/.vscode/launch.json index 085bc8e..db4dfb3 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -9,7 +9,7 @@ "type": "coreclr", "request": "launch", "preLaunchTask": "build", - "program": "${workspaceFolder}/Sample/bin/Debug/netcoreapp3.0/Sample.dll", + "program": "${workspaceFolder}/Sample/bin/Debug/net6.0/Sample.dll", "args": [], "cwd": "${workspaceFolder}", "console": "internalConsole", @@ -23,4 +23,4 @@ "processId": "${command:pickProcess}" } ] -} \ No newline at end of file +} diff --git a/Directory.Build.props b/Directory.Build.props new file mode 100644 index 0000000..2bcc6b9 --- /dev/null +++ b/Directory.Build.props @@ -0,0 +1,10 @@ + + + 11.0.0-rc2.2 + + + + + + + diff --git a/GroupBox.sln b/GroupBox.sln index d563667..0c3cead 100644 --- a/GroupBox.sln +++ b/GroupBox.sln @@ -1,48 +1,47 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.26124.0 -MinimumVisualStudioVersion = 15.0.26124.0 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GroupBox", "GroupBox\GroupBox.csproj", "{1E2912DE-0D83-420C-968D-77CD3E9F766A}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sample", "Sample\Sample.csproj", "{B3B77768-332A-4F7D-87EB-CB66150E1B1B}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 - Release|Any CPU = Release|Any CPU - Release|x64 = Release|x64 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {1E2912DE-0D83-420C-968D-77CD3E9F766A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1E2912DE-0D83-420C-968D-77CD3E9F766A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1E2912DE-0D83-420C-968D-77CD3E9F766A}.Debug|x64.ActiveCfg = Debug|Any CPU - {1E2912DE-0D83-420C-968D-77CD3E9F766A}.Debug|x64.Build.0 = Debug|Any CPU - {1E2912DE-0D83-420C-968D-77CD3E9F766A}.Debug|x86.ActiveCfg = Debug|Any CPU - {1E2912DE-0D83-420C-968D-77CD3E9F766A}.Debug|x86.Build.0 = Debug|Any CPU - {1E2912DE-0D83-420C-968D-77CD3E9F766A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1E2912DE-0D83-420C-968D-77CD3E9F766A}.Release|Any CPU.Build.0 = Release|Any CPU - {1E2912DE-0D83-420C-968D-77CD3E9F766A}.Release|x64.ActiveCfg = Release|Any CPU - {1E2912DE-0D83-420C-968D-77CD3E9F766A}.Release|x64.Build.0 = Release|Any CPU - {1E2912DE-0D83-420C-968D-77CD3E9F766A}.Release|x86.ActiveCfg = Release|Any CPU - {1E2912DE-0D83-420C-968D-77CD3E9F766A}.Release|x86.Build.0 = Release|Any CPU - {B3B77768-332A-4F7D-87EB-CB66150E1B1B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B3B77768-332A-4F7D-87EB-CB66150E1B1B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B3B77768-332A-4F7D-87EB-CB66150E1B1B}.Debug|x64.ActiveCfg = Debug|Any CPU - {B3B77768-332A-4F7D-87EB-CB66150E1B1B}.Debug|x64.Build.0 = Debug|Any CPU - {B3B77768-332A-4F7D-87EB-CB66150E1B1B}.Debug|x86.ActiveCfg = Debug|Any CPU - {B3B77768-332A-4F7D-87EB-CB66150E1B1B}.Debug|x86.Build.0 = Debug|Any CPU - {B3B77768-332A-4F7D-87EB-CB66150E1B1B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B3B77768-332A-4F7D-87EB-CB66150E1B1B}.Release|Any CPU.Build.0 = Release|Any CPU - {B3B77768-332A-4F7D-87EB-CB66150E1B1B}.Release|x64.ActiveCfg = Release|Any CPU - {B3B77768-332A-4F7D-87EB-CB66150E1B1B}.Release|x64.Build.0 = Release|Any CPU - {B3B77768-332A-4F7D-87EB-CB66150E1B1B}.Release|x86.ActiveCfg = Release|Any CPU - {B3B77768-332A-4F7D-87EB-CB66150E1B1B}.Release|x86.Build.0 = Release|Any CPU - EndGlobalSection -EndGlobal +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 17.0.31903.59 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GroupBox", "GroupBox\GroupBox.csproj", "{1E2912DE-0D83-420C-968D-77CD3E9F766A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sample", "Sample\Sample.csproj", "{B3B77768-332A-4F7D-87EB-CB66150E1B1B}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {1E2912DE-0D83-420C-968D-77CD3E9F766A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1E2912DE-0D83-420C-968D-77CD3E9F766A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1E2912DE-0D83-420C-968D-77CD3E9F766A}.Debug|x64.ActiveCfg = Debug|Any CPU + {1E2912DE-0D83-420C-968D-77CD3E9F766A}.Debug|x64.Build.0 = Debug|Any CPU + {1E2912DE-0D83-420C-968D-77CD3E9F766A}.Debug|x86.ActiveCfg = Debug|Any CPU + {1E2912DE-0D83-420C-968D-77CD3E9F766A}.Debug|x86.Build.0 = Debug|Any CPU + {1E2912DE-0D83-420C-968D-77CD3E9F766A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1E2912DE-0D83-420C-968D-77CD3E9F766A}.Release|Any CPU.Build.0 = Release|Any CPU + {1E2912DE-0D83-420C-968D-77CD3E9F766A}.Release|x64.ActiveCfg = Release|Any CPU + {1E2912DE-0D83-420C-968D-77CD3E9F766A}.Release|x64.Build.0 = Release|Any CPU + {1E2912DE-0D83-420C-968D-77CD3E9F766A}.Release|x86.ActiveCfg = Release|Any CPU + {1E2912DE-0D83-420C-968D-77CD3E9F766A}.Release|x86.Build.0 = Release|Any CPU + {B3B77768-332A-4F7D-87EB-CB66150E1B1B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B3B77768-332A-4F7D-87EB-CB66150E1B1B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B3B77768-332A-4F7D-87EB-CB66150E1B1B}.Debug|x64.ActiveCfg = Debug|Any CPU + {B3B77768-332A-4F7D-87EB-CB66150E1B1B}.Debug|x64.Build.0 = Debug|Any CPU + {B3B77768-332A-4F7D-87EB-CB66150E1B1B}.Debug|x86.ActiveCfg = Debug|Any CPU + {B3B77768-332A-4F7D-87EB-CB66150E1B1B}.Debug|x86.Build.0 = Debug|Any CPU + {B3B77768-332A-4F7D-87EB-CB66150E1B1B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B3B77768-332A-4F7D-87EB-CB66150E1B1B}.Release|Any CPU.Build.0 = Release|Any CPU + {B3B77768-332A-4F7D-87EB-CB66150E1B1B}.Release|x64.ActiveCfg = Release|Any CPU + {B3B77768-332A-4F7D-87EB-CB66150E1B1B}.Release|x64.Build.0 = Release|Any CPU + {B3B77768-332A-4F7D-87EB-CB66150E1B1B}.Release|x86.ActiveCfg = Release|Any CPU + {B3B77768-332A-4F7D-87EB-CB66150E1B1B}.Release|x86.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/GroupBox/GroupBox.csproj b/GroupBox/GroupBox.csproj index 210cbf5..97125bc 100644 --- a/GroupBox/GroupBox.csproj +++ b/GroupBox/GroupBox.csproj @@ -14,14 +14,11 @@ 1.2.1-preview5 - - %(Filename) - - + Designer - + - \ No newline at end of file + diff --git a/Sample/Program.cs b/Sample/Program.cs index 479269c..1241d53 100644 --- a/Sample/Program.cs +++ b/Sample/Program.cs @@ -1,4 +1,4 @@ -using Avalonia; +using Avalonia; namespace Sample { @@ -10,6 +10,6 @@ static void Main(string[] args) => BuildAvaloniaApp() public static AppBuilder BuildAvaloniaApp() => AppBuilder.Configure() .UsePlatformDetect() - .LogToDebug(); + .LogToTrace(); } } diff --git a/Sample/Sample.csproj b/Sample/Sample.csproj index 5ac3ecc..081489a 100644 --- a/Sample/Sample.csproj +++ b/Sample/Sample.csproj @@ -1,21 +1,14 @@ - + WinExe - netcoreapp3.0 + net6.0 - - %(Filename) - - - Designer - - - - - + + + - \ No newline at end of file + diff --git a/Sample/nuget.config b/Sample/nuget.config deleted file mode 100644 index 7c07e22..0000000 --- a/Sample/nuget.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file From 19af994ff320d50e50437263599411c09527c0f7 Mon Sep 17 00:00:00 2001 From: Noah Sherwin Date: Wed, 5 Jul 2023 02:28:53 -0700 Subject: [PATCH 03/19] build(groupbox): update Copyright to 2018-2023 --- GroupBox/GroupBox.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GroupBox/GroupBox.csproj b/GroupBox/GroupBox.csproj index 97125bc..53d76b1 100644 --- a/GroupBox/GroupBox.csproj +++ b/GroupBox/GroupBox.csproj @@ -7,7 +7,7 @@ Teast.Controls.GroupBox Niklas Jansson Niklas Jansson - Copyright © 2018-2020 + Copyright © 2018-2023 https://github.com/teast/Avalonia.GroupBox Implements an GroupBox-like component for AvalonioUI Avalonia AvalonioUI GroupBox control From 708c0fbeb4553462c64d3737668303822c2334b1 Mon Sep 17 00:00:00 2001 From: Noah Sherwin Date: Wed, 5 Jul 2023 02:29:13 -0700 Subject: [PATCH 04/19] chore(vscode): sort settings --- .vscode/settings.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 46d6f21..fd2cc76 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,4 +1,4 @@ { - "dotnet.defaultSolution": "GroupBox.sln", - "cmake.configureOnOpen": false + "cmake.configureOnOpen": false, + "dotnet.defaultSolution": "GroupBox.sln" } From 7da8fb6101b91455aff90843d43aaa4d26a4639e Mon Sep 17 00:00:00 2001 From: Noah Sherwin Date: Wed, 5 Jul 2023 02:30:44 -0700 Subject: [PATCH 05/19] chore(vscode): add tasks created by ms-dotnettools.csdevkit --- .vscode/tasks.json | 40 +++++++++++++++++++++++++++++++++------- 1 file changed, 33 insertions(+), 7 deletions(-) diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 644c6be..9144231 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -5,13 +5,39 @@ "tasks": [ { "label": "build", - "command": "dotnet build /p:GenerateFullPaths=true", - "type": "shell", - "group": "build", - "presentation": { - "reveal": "silent" - }, + "command": "dotnet", + "type": "process", + "args": [ + "build", + "${workspaceFolder}/GroupBox.sln", + "/property:GenerateFullPaths=true", + "/consoleloggerparameters:NoSummary" + ], + "problemMatcher": "$msCompile" + }, + { + "label": "publish", + "command": "dotnet", + "type": "process", + "args": [ + "publish", + "${workspaceFolder}/GroupBox.sln", + "/property:GenerateFullPaths=true", + "/consoleloggerparameters:NoSummary" + ], + "problemMatcher": "$msCompile" + }, + { + "label": "watch", + "command": "dotnet", + "type": "process", + "args": [ + "watch", + "run", + "--project", + "${workspaceFolder}/Sample/Sample.csproj" + ], "problemMatcher": "$msCompile" } ] -} \ No newline at end of file +} From d1e32ed9a74a59239e1597bd738eccbc58b7ef72 Mon Sep 17 00:00:00 2001 From: Noah Sherwin Date: Wed, 5 Jul 2023 02:32:12 -0700 Subject: [PATCH 06/19] build(groupbox): improve Description; fix type in PackageTags --- GroupBox/GroupBox.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GroupBox/GroupBox.csproj b/GroupBox/GroupBox.csproj index 53d76b1..02d6135 100644 --- a/GroupBox/GroupBox.csproj +++ b/GroupBox/GroupBox.csproj @@ -9,8 +9,8 @@ Niklas Jansson Copyright © 2018-2023 https://github.com/teast/Avalonia.GroupBox - Implements an GroupBox-like component for AvalonioUI - Avalonia AvalonioUI GroupBox control + Implements a GroupBox-like control for AvaloniaUI + Avalonia AvaloniaUI GroupBox control 1.2.1-preview5 From ced8b9bc6c70146027d604f2841d4a78221ecacc Mon Sep 17 00:00:00 2001 From: Noah Sherwin Date: Wed, 5 Jul 2023 02:42:42 -0700 Subject: [PATCH 07/19] refactor(groupbox): change GroupBox to AXAML --- GroupBox/{GroupBox.xaml => GroupBox.axaml} | 12 +- .../{GroupBox.xaml.cs => GroupBox.axaml.cs} | 210 +++++++++--------- 2 files changed, 111 insertions(+), 111 deletions(-) rename GroupBox/{GroupBox.xaml => GroupBox.axaml} (60%) rename GroupBox/{GroupBox.xaml.cs => GroupBox.axaml.cs} (94%) diff --git a/GroupBox/GroupBox.xaml b/GroupBox/GroupBox.axaml similarity index 60% rename from GroupBox/GroupBox.xaml rename to GroupBox/GroupBox.axaml index c9baf0c..061e70d 100644 --- a/GroupBox/GroupBox.xaml +++ b/GroupBox/GroupBox.axaml @@ -8,12 +8,12 @@ - - - - - - + + + + + + diff --git a/GroupBox/GroupBox.xaml.cs b/GroupBox/GroupBox.axaml.cs similarity index 94% rename from GroupBox/GroupBox.xaml.cs rename to GroupBox/GroupBox.axaml.cs index e8f0c89..74356e2 100644 --- a/GroupBox/GroupBox.xaml.cs +++ b/GroupBox/GroupBox.axaml.cs @@ -1,105 +1,105 @@ -using System; -using Avalonia; -using Avalonia.Controls; -using Avalonia.Markup.Xaml; -using Avalonia.Media; -using Avalonia.Metadata; -using Avalonia.Styling; - -namespace Teast.Controls -{ - public class GroupBox: UserControl, IStyleable - { - /// - /// Defines the property. - /// - public static readonly DirectProperty HeaderProperty = - AvaloniaProperty.RegisterDirect( - nameof(Header), - o => o.Header, - (o, v) => o.Header = o.HeaderUpperCase ? v?.ToUpperInvariant() : v ); - - /// - /// Defines the property. - /// - public static readonly StyledProperty HeaderBackgroundProperty = - AvaloniaProperty.Register(nameof(HeaderBackground)); - - /// - /// Defines the property. - /// - public static readonly StyledProperty HeaderForegroundProperty = - AvaloniaProperty.Register(nameof(HeaderForeground)); - - /// - /// Defines the property. - /// - public static readonly StyledProperty HeaderMarginProperty = - AvaloniaProperty.Register(nameof(HeaderMargin)); - - /// - /// Defines the property. - /// - public static readonly StyledProperty HeaderUpperCaseProperty = - AvaloniaProperty.Register(nameof(HeaderUpperCase)); - - private string _header; - - /// - /// Gets or sets a brush with which to paint the Header background. - /// - public IBrush HeaderBackground - { - get { return GetValue(HeaderBackgroundProperty); } - set { SetValue(HeaderBackgroundProperty, value); } - } - - /// - /// Gets or sets a brush with which to paint the Header text. - /// - public IBrush HeaderForeground - { - get { return GetValue(HeaderForegroundProperty); } - set { SetValue(HeaderForegroundProperty, value); } - } - - /// - /// Gets or sets a margin for the header text. - /// - public Thickness HeaderMargin - { - get { return GetValue(HeaderMarginProperty); } - set { SetValue(HeaderMarginProperty, value); } - } - - /// - /// Gets or sets if the header text should be converted to upper-case - /// - public bool HeaderUpperCase - { - get { return GetValue(HeaderUpperCaseProperty); } - set { SetValue(HeaderUpperCaseProperty, value); } - } - - /// - /// Gets or sets header text - /// - public string Header - { - get { return _header; } - set { SetAndRaise(HeaderProperty, ref _header, value); } - } - - Type IStyleable.StyleKey => typeof(GroupBox); - - public GroupBox() - { - InitializeComponent(); - } - - private void InitializeComponent() - { - AvaloniaXamlLoader.Load(this); - } - } -} +using System; +using Avalonia; +using Avalonia.Controls; +using Avalonia.Markup.Xaml; +using Avalonia.Media; +using Avalonia.Metadata; +using Avalonia.Styling; + +namespace Teast.Controls +{ + public class GroupBox : UserControl, IStyleable + { + /// + /// Defines the property. + /// + public static readonly DirectProperty HeaderProperty = + AvaloniaProperty.RegisterDirect( + nameof(Header), + o => o.Header, + (o, v) => o.Header = o.HeaderUpperCase ? v?.ToUpperInvariant() : v); + + /// + /// Defines the property. + /// + public static readonly StyledProperty HeaderBackgroundProperty = + AvaloniaProperty.Register(nameof(HeaderBackground)); + + /// + /// Defines the property. + /// + public static readonly StyledProperty HeaderForegroundProperty = + AvaloniaProperty.Register(nameof(HeaderForeground)); + + /// + /// Defines the property. + /// + public static readonly StyledProperty HeaderMarginProperty = + AvaloniaProperty.Register(nameof(HeaderMargin)); + + /// + /// Defines the property. + /// + public static readonly StyledProperty HeaderUpperCaseProperty = + AvaloniaProperty.Register(nameof(HeaderUpperCase)); + + private string _header; + + /// + /// Gets or sets a brush with which to paint the Header background. + /// + public IBrush HeaderBackground + { + get { return GetValue(HeaderBackgroundProperty); } + set { SetValue(HeaderBackgroundProperty, value); } + } + + /// + /// Gets or sets a brush with which to paint the Header text. + /// + public IBrush HeaderForeground + { + get { return GetValue(HeaderForegroundProperty); } + set { SetValue(HeaderForegroundProperty, value); } + } + + /// + /// Gets or sets a margin for the header text. + /// + public Thickness HeaderMargin + { + get { return GetValue(HeaderMarginProperty); } + set { SetValue(HeaderMarginProperty, value); } + } + + /// + /// Gets or sets if the header text should be converted to upper-case + /// + public bool HeaderUpperCase + { + get { return GetValue(HeaderUpperCaseProperty); } + set { SetValue(HeaderUpperCaseProperty, value); } + } + + /// + /// Gets or sets header text + /// + public string Header + { + get { return _header; } + set { SetAndRaise(HeaderProperty, ref _header, value); } + } + + Type IStyleable.StyleKey => typeof(GroupBox); + + public GroupBox() + { + InitializeComponent(); + } + + private void InitializeComponent() + { + AvaloniaXamlLoader.Load(this); + } + } +} From 75759b28f6a0e45732539305c51e041b6e7b8cd9 Mon Sep 17 00:00:00 2001 From: Noah Sherwin Date: Wed, 5 Jul 2023 02:44:04 -0700 Subject: [PATCH 08/19] style(groupbox): format GroupBox.axaml --- GroupBox/GroupBox.axaml | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/GroupBox/GroupBox.axaml b/GroupBox/GroupBox.axaml index 061e70d..1f9af10 100644 --- a/GroupBox/GroupBox.axaml +++ b/GroupBox/GroupBox.axaml @@ -2,17 +2,32 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" - xmlns:teast="clr-namespace:Teast.Controls" mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" x:Class="Teast.Controls.GroupBox"> + xmlns:teast="clr-namespace:Teast.Controls" + mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" + x:Class="Teast.Controls.GroupBox"> - \ No newline at end of file + From d6c744c955be30fdde081f0339737f08bbf14c85 Mon Sep 17 00:00:00 2001 From: Noah Sherwin Date: Wed, 5 Jul 2023 02:46:07 -0700 Subject: [PATCH 10/19] fix(sample): update App for Avalonia 11 changes refactor: change App to AXAML --- Sample/{App.xaml => App.axaml} | 6 +++--- Sample/{App.xaml.cs => App.axaml.cs} | 0 2 files changed, 3 insertions(+), 3 deletions(-) rename Sample/{App.xaml => App.axaml} (79%) rename Sample/{App.xaml.cs => App.axaml.cs} (100%) diff --git a/Sample/App.xaml b/Sample/App.axaml similarity index 79% rename from Sample/App.xaml rename to Sample/App.axaml index 005da4f..28ace5f 100644 --- a/Sample/App.xaml +++ b/Sample/App.axaml @@ -3,11 +3,11 @@ xmlns:teast="clr-namespace:Teast.Controls;assembly=Teast.Controls.GroupBox" x:Class="Sample.App"> - - + + diff --git a/Sample/App.xaml.cs b/Sample/App.axaml.cs similarity index 100% rename from Sample/App.xaml.cs rename to Sample/App.axaml.cs From c31999d89bf3c9bb41e53b5fa8c27b115500fa96 Mon Sep 17 00:00:00 2001 From: Noah Sherwin Date: Wed, 5 Jul 2023 02:48:05 -0700 Subject: [PATCH 11/19] refactor(sample): change MainWindow to AXAML --- Sample/{MainWindow.xaml => MainWindow.axaml} | 0 Sample/{MainWindow.xaml.cs => MainWindow.axaml.cs} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename Sample/{MainWindow.xaml => MainWindow.axaml} (100%) rename Sample/{MainWindow.xaml.cs => MainWindow.axaml.cs} (100%) diff --git a/Sample/MainWindow.xaml b/Sample/MainWindow.axaml similarity index 100% rename from Sample/MainWindow.xaml rename to Sample/MainWindow.axaml diff --git a/Sample/MainWindow.xaml.cs b/Sample/MainWindow.axaml.cs similarity index 100% rename from Sample/MainWindow.xaml.cs rename to Sample/MainWindow.axaml.cs From c9e3ef6d620936dc8e68f262bf7e1ec394832a2e Mon Sep 17 00:00:00 2001 From: Noah Sherwin Date: Wed, 5 Jul 2023 02:57:50 -0700 Subject: [PATCH 12/19] fix(groupbox): add missing 'partial' modifier to GroupBox --- GroupBox/GroupBox.axaml.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GroupBox/GroupBox.axaml.cs b/GroupBox/GroupBox.axaml.cs index 74356e2..336db95 100644 --- a/GroupBox/GroupBox.axaml.cs +++ b/GroupBox/GroupBox.axaml.cs @@ -1,4 +1,4 @@ -using System; +using System; using Avalonia; using Avalonia.Controls; using Avalonia.Markup.Xaml; @@ -8,7 +8,7 @@ namespace Teast.Controls { - public class GroupBox : UserControl, IStyleable + public partial class GroupBox : UserControl, IStyleable { /// /// Defines the property. From e69ab4ad09dc6471cea910d54b44a65ed62f4ef1 Mon Sep 17 00:00:00 2001 From: Noah Sherwin Date: Wed, 5 Jul 2023 02:59:19 -0700 Subject: [PATCH 13/19] style(groupbox): remove unnecessary Using Using directive is unnecessary. Roslyn(IDE0005) --- GroupBox/GroupBox.axaml.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/GroupBox/GroupBox.axaml.cs b/GroupBox/GroupBox.axaml.cs index 336db95..b386dde 100644 --- a/GroupBox/GroupBox.axaml.cs +++ b/GroupBox/GroupBox.axaml.cs @@ -3,7 +3,6 @@ using Avalonia.Controls; using Avalonia.Markup.Xaml; using Avalonia.Media; -using Avalonia.Metadata; using Avalonia.Styling; namespace Teast.Controls From 9ccf331236cba8d2d04312cb00c3cae59667fcc1 Mon Sep 17 00:00:00 2001 From: Noah Sherwin Date: Wed, 5 Jul 2023 03:20:34 -0700 Subject: [PATCH 14/19] fix(sample): add missing 'partial' modifier to Sample.App --- Sample/App.axaml.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Sample/App.axaml.cs b/Sample/App.axaml.cs index 54e275a..c2b4405 100644 --- a/Sample/App.axaml.cs +++ b/Sample/App.axaml.cs @@ -4,13 +4,13 @@ namespace Sample { - public class App : Application + public partial class App : Application { public override void Initialize() { AvaloniaXamlLoader.Load(this); } - + public override void OnFrameworkInitializationCompleted() { if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop) @@ -20,5 +20,5 @@ public override void OnFrameworkInitializationCompleted() base.OnFrameworkInitializationCompleted(); } - } -} \ No newline at end of file + } +} From ff642f863f4538549310e4039cfb1018593bc6ed Mon Sep 17 00:00:00 2001 From: Noah Sherwin Date: Wed, 5 Jul 2023 03:24:27 -0700 Subject: [PATCH 15/19] refactor(groupbox): remove deprecated interface 'IStyleable' This interface will probably be removed in Avalonia 12. It's already redundant as most Control classes are now based on StyledElement, a concrete class equivalent to IStylable. --- GroupBox/GroupBox.axaml.cs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/GroupBox/GroupBox.axaml.cs b/GroupBox/GroupBox.axaml.cs index b386dde..2dc8c09 100644 --- a/GroupBox/GroupBox.axaml.cs +++ b/GroupBox/GroupBox.axaml.cs @@ -1,13 +1,11 @@ -using System; using Avalonia; using Avalonia.Controls; using Avalonia.Markup.Xaml; using Avalonia.Media; -using Avalonia.Styling; namespace Teast.Controls { - public partial class GroupBox : UserControl, IStyleable + public partial class GroupBox : UserControl { /// /// Defines the property. @@ -89,8 +87,6 @@ public string Header set { SetAndRaise(HeaderProperty, ref _header, value); } } - Type IStyleable.StyleKey => typeof(GroupBox); - public GroupBox() { InitializeComponent(); From 48b385f554fa2f52ee14b43b6d194f272cc61f30 Mon Sep 17 00:00:00 2001 From: Noah Sherwin Date: Wed, 5 Jul 2023 03:25:09 -0700 Subject: [PATCH 16/19] fix(sample): add missing 'partial' modifier to MainWindow --- Sample/MainWindow.axaml.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Sample/MainWindow.axaml.cs b/Sample/MainWindow.axaml.cs index 770d1a5..8dfb754 100644 --- a/Sample/MainWindow.axaml.cs +++ b/Sample/MainWindow.axaml.cs @@ -1,10 +1,9 @@ -using Avalonia; using Avalonia.Controls; using Avalonia.Markup.Xaml; namespace Sample { - public class MainWindow : Window + public partial class MainWindow : Window { public MainWindow() { @@ -16,4 +15,4 @@ private void InitializeComponent() AvaloniaXamlLoader.Load(this); } } -} \ No newline at end of file +} From 13c1121abfb459aaa47ffd83e51fc95e2e377dd1 Mon Sep 17 00:00:00 2001 From: Noah Sherwin Date: Wed, 5 Jul 2023 04:24:45 -0700 Subject: [PATCH 17/19] fix(groupbox, sample): remove handwritten IntializeComponent() this is now a generated method --- GroupBox/GroupBox.axaml.cs | 6 ------ Sample/MainWindow.axaml.cs | 6 ------ 2 files changed, 12 deletions(-) diff --git a/GroupBox/GroupBox.axaml.cs b/GroupBox/GroupBox.axaml.cs index 2dc8c09..0a9aa4f 100644 --- a/GroupBox/GroupBox.axaml.cs +++ b/GroupBox/GroupBox.axaml.cs @@ -1,6 +1,5 @@ using Avalonia; using Avalonia.Controls; -using Avalonia.Markup.Xaml; using Avalonia.Media; namespace Teast.Controls @@ -91,10 +90,5 @@ public GroupBox() { InitializeComponent(); } - - private void InitializeComponent() - { - AvaloniaXamlLoader.Load(this); - } } } diff --git a/Sample/MainWindow.axaml.cs b/Sample/MainWindow.axaml.cs index 8dfb754..56c0797 100644 --- a/Sample/MainWindow.axaml.cs +++ b/Sample/MainWindow.axaml.cs @@ -1,5 +1,4 @@ using Avalonia.Controls; -using Avalonia.Markup.Xaml; namespace Sample { @@ -9,10 +8,5 @@ public MainWindow() { InitializeComponent(); } - - private void InitializeComponent() - { - AvaloniaXamlLoader.Load(this); - } } } From 93a02006e2d2f49035ba4ddd3adf092cbcf1cccf Mon Sep 17 00:00:00 2001 From: Noah Sherwin Date: Wed, 5 Jul 2023 04:38:47 -0700 Subject: [PATCH 18/19] build(deps-dev): add Microsoft.SourceLink.GitHub --- GroupBox/GroupBox.csproj | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/GroupBox/GroupBox.csproj b/GroupBox/GroupBox.csproj index 02d6135..69cab75 100644 --- a/GroupBox/GroupBox.csproj +++ b/GroupBox/GroupBox.csproj @@ -9,16 +9,23 @@ Niklas Jansson Copyright © 2018-2023 https://github.com/teast/Avalonia.GroupBox + https://github.com/teast/Avalonia.GroupBox + true + true + snupkg + ..\README.md Implements a GroupBox-like control for AvaloniaUI Avalonia AvaloniaUI GroupBox control 1.2.1-preview5 + Designer + From 6e9505f6abb91457912356de72e2a563003c858b Mon Sep 17 00:00:00 2001 From: Noah Sherwin Date: Wed, 5 Jul 2023 04:41:26 -0700 Subject: [PATCH 19/19] chore(release): 2.0.0-rc2.2 --- CHANGELOG.md | 55 ++++++++++++++++++++++++++++++++++++++++ GroupBox/GroupBox.csproj | 2 +- 2 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..5e155db --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,55 @@ +# Change Log + +All notable changes to this project will be documented in this file. See [versionize](https://github.com/versionize/versionize) for commit guidelines. + + +## [2.0.0-rc2.2](https://www.github.com/BinToss/teast.GroupBox.Avalonia/releases/tag/v2.0.0-rc2.2) (2023-7-5) + +### Bug Fixes + +* **groupbox:** add missing 'partial' modifier to GroupBox ([c9e3ef6](https://www.github.com/BinToss/teast.GroupBox.Avalonia/commit/c9e3ef6d620936dc8e68f262bf7e1ec394832a2e)) +* **groupbox, sample:** remove handwritten IntializeComponent() ([13c1121](https://www.github.com/BinToss/teast.GroupBox.Avalonia/commit/13c1121abfb459aaa47ffd83e51fc95e2e377dd1)) +* **sample:** add missing 'partial' modifier to MainWindow ([48b385f](https://www.github.com/BinToss/teast.GroupBox.Avalonia/commit/48b385f554fa2f52ee14b43b6d194f272cc61f30)) +* **sample:** add missing 'partial' modifier to Sample.App ([9ccf331](https://www.github.com/BinToss/teast.GroupBox.Avalonia/commit/9ccf331236cba8d2d04312cb00c3cae59667fcc1)) +* **sample:** update App for Avalonia 11 changes ([d6c744c](https://www.github.com/BinToss/teast.GroupBox.Avalonia/commit/d6c744c955be30fdde081f0339737f08bbf14c85)) + +### Breaking Changes + +* **groupbox, deps, sample, vscode:** upgrade Avalonia to 11.0.0-rc2.2 ([8ff736c](https://www.github.com/BinToss/teast.GroupBox.Avalonia/commit/8ff736c1edf3809d9a807e4941e3b05e65013214)) + +### Other + +* **deps-dev:** add Microsoft.SourceLink.GitHub ([93a0200](https://www.github.com/BinToss/teast.GroupBox.Avalonia/commit/93a02006e2d2f49035ba4ddd3adf092cbcf1cccf)) +* **groupbox:** change Default style to AXAML ([ec978b0](https://www.github.com/BinToss/teast.GroupBox.Avalonia/commit/ec978b0a734f27439ef3976a9dd055aa2d36a5aa)) +* **groupbox:** change GroupBox to AXAML ([ced8b9b](https://www.github.com/BinToss/teast.GroupBox.Avalonia/commit/ced8b9bc6c70146027d604f2841d4a78221ecacc)) +* **groupbox:** format GroupBox.axaml ([75759b2](https://www.github.com/BinToss/teast.GroupBox.Avalonia/commit/75759b28f6a0e45732539305c51e041b6e7b8cd9)) +* **groupbox:** improve Description; fix type in PackageTags ([d1e32ed](https://www.github.com/BinToss/teast.GroupBox.Avalonia/commit/d1e32ed9a74a59239e1597bd738eccbc58b7ef72)) +* **groupbox:** remove deprecated interface 'IStyleable' ([ff642f8](https://www.github.com/BinToss/teast.GroupBox.Avalonia/commit/ff642f863f4538549310e4039cfb1018593bc6ed)) +* **groupbox:** remove unnecessary Using ([e69ab4a](https://www.github.com/BinToss/teast.GroupBox.Avalonia/commit/e69ab4ad09dc6471cea910d54b44a65ed62f4ef1)) +* **groupbox:** update Copyright to 2018-2023 ([19af994](https://www.github.com/BinToss/teast.GroupBox.Avalonia/commit/19af994ff320d50e50437263599411c09527c0f7)) +* **sample:** change MainWindow to AXAML ([c31999d](https://www.github.com/BinToss/teast.GroupBox.Avalonia/commit/c31999d89bf3c9bb41e53b5fa8c27b115500fa96)) +* **vscode:** add tasks created by ms-dotnettools.csdevkit ([7da8fb6](https://www.github.com/BinToss/teast.GroupBox.Avalonia/commit/7da8fb6101b91455aff90843d43aaa4d26a4639e)) +* **vscode:** set dotnet.defaultSolution; disable cmake.configureOnOpen ([775a59e](https://www.github.com/BinToss/teast.GroupBox.Avalonia/commit/775a59ea75e960edbb7bf1978a693d1074500055)) +* **vscode:** sort settings ([708c0fb](https://www.github.com/BinToss/teast.GroupBox.Avalonia/commit/708c0fbeb4553462c64d3737668303822c2334b1)) + + +## 1.2.1-preview5 + +### Bug Fixes + +* move styling into its own file +* add support for border and content margin + + +## 1.2.0.0-preview5 + +### Features + +* bump Avalonia to 0.10.0-preview5 + + +## 1.1.1.0 + +### Features + +* bump Avalonia to 0.9.12 diff --git a/GroupBox/GroupBox.csproj b/GroupBox/GroupBox.csproj index 69cab75..bb3c38d 100644 --- a/GroupBox/GroupBox.csproj +++ b/GroupBox/GroupBox.csproj @@ -16,7 +16,7 @@ ..\README.md Implements a GroupBox-like control for AvaloniaUI Avalonia AvaloniaUI GroupBox control - 1.2.1-preview5 + 2.0.0-rc2.2