From 43b4664536884648a9310fd3d7371822c98508dc Mon Sep 17 00:00:00 2001 From: Giuseppe Lippolis Date: Tue, 14 Nov 2023 17:27:40 +0100 Subject: [PATCH 1/5] feat: modernize TemplateControl template --- .../NewTemplatedControl.axaml | 36 ++++++++++++++---- .../NewTemplatedControl.axaml.cs | 2 + .../NewTemplatedControl.axaml | 37 +++++++++++++++---- .../NewTemplatedControl.axaml.fs | 2 + 4 files changed, 62 insertions(+), 15 deletions(-) diff --git a/templates/csharp/templatedcontrol/NewTemplatedControl.axaml b/templates/csharp/templatedcontrol/NewTemplatedControl.axaml index 9634f151..fe6c4b69 100644 --- a/templates/csharp/templatedcontrol/NewTemplatedControl.axaml +++ b/templates/csharp/templatedcontrol/NewTemplatedControl.axaml @@ -1,16 +1,38 @@ - - + + + + + + + + + + + + - - + + diff --git a/templates/csharp/templatedcontrol/NewTemplatedControl.axaml.cs b/templates/csharp/templatedcontrol/NewTemplatedControl.axaml.cs index cba31245..bbc9fe4a 100644 --- a/templates/csharp/templatedcontrol/NewTemplatedControl.axaml.cs +++ b/templates/csharp/templatedcontrol/NewTemplatedControl.axaml.cs @@ -4,4 +4,6 @@ namespace AvaloniaAppTemplate.Namespace; public class NewTemplatedControl : TemplatedControl { + protected override Type StyleKeyOverride => + typeof(Avalonia.Labs.Controls.ContentDialog); } \ No newline at end of file diff --git a/templates/fsharp/templatedcontrol/NewTemplatedControl.axaml b/templates/fsharp/templatedcontrol/NewTemplatedControl.axaml index 9634f151..89c35615 100644 --- a/templates/fsharp/templatedcontrol/NewTemplatedControl.axaml +++ b/templates/fsharp/templatedcontrol/NewTemplatedControl.axaml @@ -1,16 +1,37 @@ - - - + + + + + + + + + + + + - - + + diff --git a/templates/fsharp/templatedcontrol/NewTemplatedControl.axaml.fs b/templates/fsharp/templatedcontrol/NewTemplatedControl.axaml.fs index 0fb74e09..1f67d247 100644 --- a/templates/fsharp/templatedcontrol/NewTemplatedControl.axaml.fs +++ b/templates/fsharp/templatedcontrol/NewTemplatedControl.axaml.fs @@ -4,3 +4,5 @@ open Avalonia.Controls.Primitives type NewTemplatedControl () = inherit TemplatedControl () + override StyleKeyOverride + with get() = typedefof From c53b1d045312c889d3e2734e6db403d619bda0a6 Mon Sep 17 00:00:00 2001 From: Giuseppe Lippolis Date: Thu, 16 Nov 2023 12:39:04 +0100 Subject: [PATCH 2/5] fix: Address review --- .../NewTemplatedControl.axaml | 36 +++++++++---------- .../NewTemplatedControl.axaml.cs | 2 -- .../NewTemplatedControl.axaml | 31 ++++++++-------- .../NewTemplatedControl.axaml.fs | 2 -- 4 files changed, 32 insertions(+), 39 deletions(-) diff --git a/templates/csharp/templatedcontrol/NewTemplatedControl.axaml b/templates/csharp/templatedcontrol/NewTemplatedControl.axaml index fe6c4b69..3fb38fe0 100644 --- a/templates/csharp/templatedcontrol/NewTemplatedControl.axaml +++ b/templates/csharp/templatedcontrol/NewTemplatedControl.axaml @@ -1,33 +1,31 @@ - - - + + - + + + - + + + - + + + - - - - - - - - - - - - + + @@ -35,4 +33,4 @@ - + \ No newline at end of file diff --git a/templates/csharp/templatedcontrol/NewTemplatedControl.axaml.cs b/templates/csharp/templatedcontrol/NewTemplatedControl.axaml.cs index bbc9fe4a..cba31245 100644 --- a/templates/csharp/templatedcontrol/NewTemplatedControl.axaml.cs +++ b/templates/csharp/templatedcontrol/NewTemplatedControl.axaml.cs @@ -4,6 +4,4 @@ namespace AvaloniaAppTemplate.Namespace; public class NewTemplatedControl : TemplatedControl { - protected override Type StyleKeyOverride => - typeof(Avalonia.Labs.Controls.ContentDialog); } \ No newline at end of file diff --git a/templates/fsharp/templatedcontrol/NewTemplatedControl.axaml b/templates/fsharp/templatedcontrol/NewTemplatedControl.axaml index 89c35615..b4c684cb 100644 --- a/templates/fsharp/templatedcontrol/NewTemplatedControl.axaml +++ b/templates/fsharp/templatedcontrol/NewTemplatedControl.axaml @@ -2,31 +2,30 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:controls="using:AvaloniaAppTemplate.Namespace"> - + - + + + - + + + - + + + - - - - - - - - - - - - + + diff --git a/templates/fsharp/templatedcontrol/NewTemplatedControl.axaml.fs b/templates/fsharp/templatedcontrol/NewTemplatedControl.axaml.fs index 1f67d247..0fb74e09 100644 --- a/templates/fsharp/templatedcontrol/NewTemplatedControl.axaml.fs +++ b/templates/fsharp/templatedcontrol/NewTemplatedControl.axaml.fs @@ -4,5 +4,3 @@ open Avalonia.Controls.Primitives type NewTemplatedControl () = inherit TemplatedControl () - override StyleKeyOverride - with get() = typedefof From b71f1d10e95525476748282aa55064dffb806bb5 Mon Sep 17 00:00:00 2001 From: Giuseppe Lippolis Date: Thu, 30 Nov 2023 09:26:55 +0100 Subject: [PATCH 3/5] fix: Address review --- .../NewTemplatedControl.axaml | 38 +++++++------------ .../NewTemplatedControl.axaml | 36 +++++++----------- 2 files changed, 27 insertions(+), 47 deletions(-) diff --git a/templates/csharp/templatedcontrol/NewTemplatedControl.axaml b/templates/csharp/templatedcontrol/NewTemplatedControl.axaml index 3fb38fe0..3aff9b93 100644 --- a/templates/csharp/templatedcontrol/NewTemplatedControl.axaml +++ b/templates/csharp/templatedcontrol/NewTemplatedControl.axaml @@ -1,36 +1,26 @@ - + + + - - - - - - - - - - - - - - - + + + - - - + - + - \ No newline at end of file + diff --git a/templates/fsharp/templatedcontrol/NewTemplatedControl.axaml b/templates/fsharp/templatedcontrol/NewTemplatedControl.axaml index b4c684cb..3aff9b93 100644 --- a/templates/fsharp/templatedcontrol/NewTemplatedControl.axaml +++ b/templates/fsharp/templatedcontrol/NewTemplatedControl.axaml @@ -1,35 +1,25 @@ - + + + - - - - - - - - - - - - - - - + + + - - - + - + From e2028a4904e6b9b80e7d2984b64bf11af1c5041a Mon Sep 17 00:00:00 2001 From: workgroupengineering Date: Thu, 30 Nov 2023 10:52:50 +0100 Subject: [PATCH 4/5] fix: Address review Co-authored-by: Max Katz --- .../csharp/templatedcontrol/NewTemplatedControl.axaml | 10 ++++++---- .../fsharp/templatedcontrol/NewTemplatedControl.axaml | 10 ++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/templates/csharp/templatedcontrol/NewTemplatedControl.axaml b/templates/csharp/templatedcontrol/NewTemplatedControl.axaml index 3aff9b93..bc9135b0 100644 --- a/templates/csharp/templatedcontrol/NewTemplatedControl.axaml +++ b/templates/csharp/templatedcontrol/NewTemplatedControl.axaml @@ -3,11 +3,13 @@ xmlns:controls="using:AvaloniaAppTemplate.Namespace"> + diff --git a/templates/fsharp/templatedcontrol/NewTemplatedControl.axaml b/templates/fsharp/templatedcontrol/NewTemplatedControl.axaml index 3aff9b93..bc9135b0 100644 --- a/templates/fsharp/templatedcontrol/NewTemplatedControl.axaml +++ b/templates/fsharp/templatedcontrol/NewTemplatedControl.axaml @@ -3,11 +3,13 @@ xmlns:controls="using:AvaloniaAppTemplate.Namespace"> + From 792e13491a9323499a113bc02e9eaa8c10564bcf Mon Sep 17 00:00:00 2001 From: Giuseppe Lippolis Date: Wed, 13 Dec 2023 12:51:23 +0100 Subject: [PATCH 5/5] fix: Address review --- templates/csharp/templatedcontrol/NewTemplatedControl.axaml | 2 +- templates/fsharp/templatedcontrol/NewTemplatedControl.axaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/csharp/templatedcontrol/NewTemplatedControl.axaml b/templates/csharp/templatedcontrol/NewTemplatedControl.axaml index bc9135b0..cc95995d 100644 --- a/templates/csharp/templatedcontrol/NewTemplatedControl.axaml +++ b/templates/csharp/templatedcontrol/NewTemplatedControl.axaml @@ -21,7 +21,7 @@ - + diff --git a/templates/fsharp/templatedcontrol/NewTemplatedControl.axaml b/templates/fsharp/templatedcontrol/NewTemplatedControl.axaml index bc9135b0..cc95995d 100644 --- a/templates/fsharp/templatedcontrol/NewTemplatedControl.axaml +++ b/templates/fsharp/templatedcontrol/NewTemplatedControl.axaml @@ -21,7 +21,7 @@ - +