microsoft / VSExtensibility

A repo for upcoming changes to extensibility in Visual Studio, the new extensibility model, and language server protocol.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Question] Why not create Control.xaml.cs File

shaggygi opened this issue · comments

Why is the usual Control.xaml.cs file not included when creating UI? For example, when creating the Tool Window the following is generated:

  • MyToolWindowControl.xaml
  • MyToolWindowControl.cs // One in question.

Seems like it would be:

  • MyToolWindowControl.xaml
  • MyToolWindowControl.xaml.cs

Is this the new normal for extensibility going forward or are there plans to update in future release?

Update:
Understanding this is more related to the complexities of Remote UI, seems like there could be some niceties around VS structure in the Solution Explorer. Not sure how it would work since similar files are used elsewhere.

Would be nice to have the code and data files grouped together, albeit, still separate. For example...

  • MyToolWindowControl.xaml
    • MyToolWindowControl.cs
    • MyToolWindowControlData.cs

There is no particular reason, except the fact that the MyToolWindowControl.cs is not a code behind file (Remote UI doesn't have any support for code behind).
We may look into grouping files in the future but probably not the data context file (since it can have an arbitrary name).