Replies: 4 comments 2 replies
-
To further expand on why this matters:
|
Beta Was this translation helpful? Give feedback.
-
EVERY single time I start a new project I delete the content and replace with a Grid, then get a compile error because I forgot to delete the click handler. |
Beta Was this translation helpful? Give feedback.
-
The IDE1006 naming violation is derived from Visual Studio's automatic event-handler creation code. The |
Beta Was this translation helpful? Give feedback.
-
For transparency and tracking purposes of these questions, it seems the VSIX templates for WinUI3/Project Reunion may be moving to be part of Windows Template Studio: microsoft/TemplateStudio#4164 |
Beta Was this translation helpful? Give feedback.
-
The default WinUI3 app project templates (C# & C++) includes the following in MainWindow.xaml and MainPage.xaml.
I appreciate that there was probably a desire to have some basic functionality in what is created by default, but why this specifically?
Is the intention that developers should remove all of the above from the generated app?
Using
StackPanel
as a top level container (within the Page or Window) is not something I see very often. Do you have research that shows this is common practice in shipping apps?Having a StackPanel with only a single child element is rarely a good idea. Doesn't this set a bad example? Especially to new developers, for whom (presumably) this content is particularly targeted?
The
StackPanel
specifies the propertyOrientation="Horizontal"
but this is irrelevant as there is only one child element. Was there a deliberate reason for specifying a property that has no effect on the rendered UI?The name
myButton_Click
causes VisualStudio to report suggestion IDE1006 as a naming violation because the .NET naming convention is that functions should start with an uppercase character. Is this: an unintentional side-effect of the way the method name is based on theX:Name
of the button; a lack of consideration for .NET conventions; or a deliberate break from conventions that will eventually be addressed in another way?The same template pack includes a new Blank Page/Window option that includes an empty
Grid
as the only content of the Page/Window. Knowing why a Grid isn't used here too would help understand how these decisions were made.Someone made the decision to use this XAML and giving us an understanding of why will help the community by:
The following produces exactly the same output as the above but with the benefits of:
StackPanel
that is expected to be deleted by the developer.Grid
that it is expected would need to added by the developer.As these templates weren't public at the time these decisions were made, it would also be great to understand how the decision to include this code was tested. Was it only reviewed internally or did you reach out to new and experienced developers to get their feedback as part of a user testing program?
Beta Was this translation helpful? Give feedback.
All reactions