VincentH-Net / CSharpForMarkup

Concise, declarative C# UI markup for .NET browser / native UI frameworks
MIT License
748 stars 43 forks source link

How do you nesting your files? #5

Closed luismts closed 4 years ago

luismts commented 4 years ago

I have started using your extension as I mentioned before in my blog post here. Now, I'm looking for a file nesting extension for VS2019.

I would like to use the convention file.cs and file.logic.cs but all the extension I have installed did not work. DO you do it manually?

VincentH-Net commented 4 years ago

Hi Luis, yes I simply name the page file something like LoginPage.cs and if that page has any logic (most don't) then I manually create an additional LoginPage.Logic.cs and make the LoginPage class partial in both files. I don't like to collapse the logic file in the solution explorer - to me it's similar to creating a folder for just one file - it just adds an extra click to get to the file. The logic files don't clutter my solution explorer view because most pages don't have UI logic. Ymmv of course

Btw thanks for that blog post - we need to keep pushing the Forms team to accept the PR and posts like that help.