AvaloniaUI / AvaloniaVS

Visual Studio Extension for Avalonia
MIT License
432 stars 83 forks source link

Regions in AXAML files #468

Open ProviceUnify opened 7 months ago

ProviceUnify commented 7 months ago

Is your feature request related to a problem? Please describe.

I worked with requested feature in stock WPF. It was very comfortable to organize code's sectors

Describe the solution you'd like

For example, we have large code segment:

<Grid>
  <Lot>
    <Xaml>
      <Code>
        <Inside>
        ...
        </Inside>
      </Code>
    </Xaml>
  </Lot>
</Grid>

Would be good to do something like this:

<!-- #region Block of ... -->
<Grid>
  <Lot>
    <Xaml>
      <Code>
        <Inside>
        ...
        </Inside>
      </Code>
    </Xaml>
  </Lot>
</Grid>
<!-- #endregion -->

To get collapsible block of code in sources like this:

> #Block of ...

It is must save collapsion state. Default behaviour of collapsibles in current Avalonia don't save its state. If VS or file were reopenned all collapsible will expand again now

Describe alternatives you've considered

Good solution is already in extentions but as i know it doesn't work with Avalonia (got error on installation, unable to check) https://marketplace.visualstudio.com/items?itemName=JacobJohnston.XAMLRegions

Additional context

No response

ProviceUnify commented 7 months ago

Seems like this feature is native for VS also.. Described solution doesn't work since VS 2017