Can't see property name when Collapse to Definitions

Bùi Hữu Giáp 1 Reputation point
2021-05-03T03:50:12.24+00:00

93209-collapsecode.png
93156-collapsecode2013.png

I'm using Visual Studio 2019, when I use the Collapse to Definitions feature I can't see the names of the properties in the code editor's display area but just Custom Attributes. I need and always use the names of properties along with their data types and don't need Custom Attributes. I have only declared Custom Attributes once and will almost never care about it again. The situation is similar with Visual Studio 2017.
How can I set up Custom Attributes to be hidden and property names always appear at the beginning of the line when using the Collapse to Definitions feature like Visual Studio 2013?

Developer technologies | VB
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Viorel 122.6K Reputation points
    2021-05-03T08:24:43.543+00:00

    You will see the property if you scroll the window to the right. This is inconvenient. It probably has sense to report it using “Suggest a feature…” or “Report a problem…” from Help, Send Feedback menu.

    0 comments No comments

  2. Dewayne Basnett 1,381 Reputation points
    2021-05-03T13:32:47.197+00:00

    You are writing the property like this

        <DefaultValue(-42)> <Description("Foo when I use the Collapse to Definitions feature I can't see the names of the properties")> Public Property foo As Integer
    

    It can be written like this

        <DefaultValue(-42)> <Description("Foo when I use the Collapse to Definitions feature I can't see the names of the properties")>
        Public Property foo As Integer
    
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.