mfractor / mfractor-feedback

Found a bug or have a feature request for MFractor? Submit it here!
3 stars 0 forks source link

When a XAML Control is Extracted on Windows the Code-behind is not nested #229

Closed ravero closed 4 years ago

ravero commented 4 years ago

When a new XAML Control is exported in Windows the code-behind file doesn't appear nested in the XAML file:

Screen Shot 2020-05-26 at 21 42 13

In theory Visual Studio identity and nest items automatically, but this is happening on Visual Studio 16.6 and I suspect that a specific MSBuild entry must be added to the .csproj to describe and for Visual Studio to identify the nesting correctly.

matthewrdev commented 4 years ago

This is should happen automatically in SDK style projects, however, we might need to set the DependsUpon property to ensure this works correctly.

The CreateProjectFileWorkUnit should do this, indicating that the Windows specific file creation logic is not honouring the DependsUpon flag. Likely need to look at the DTE Project Item and figure out how to apply the DependUpon flag onto its property collection.

matthewrdev commented 4 years ago

This has been fixed and will be available in MFractor 4.2.7.