{"id":72,"date":"2010-06-01T11:14:00","date_gmt":"2010-06-01T11:14:00","guid":{"rendered":"https:\/\/wdev-blog.azurewebsites.net\/index.php\/2010\/06\/01\/collapse-amp-expand-code\/"},"modified":"2010-06-01T11:14:00","modified_gmt":"2010-06-01T11:14:00","slug":"collapse-amp-expand-code","status":"publish","type":"post","link":"http:\/\/panahy.nl\/index.php\/2010\/06\/01\/collapse-amp-expand-code\/","title":{"rendered":"Collapse &#038;amp Expand Code"},"content":{"rendered":"<p>When I use Visual Studio IDE to edit an XML file, I often come accross a big tree that is not easily to find my way out. So I start to collapse the expanded nodes. Unfortunately it might be very hard to do this.<br \/>So I was looking for a macro to do it and found the following macro which I attached a toolbar icon to it:<\/p>\n<pre><br \/><code><br \/>'' Toggle the current row and go down one line<br \/>   Sub ToggleOne()<br \/>       Dim cmd As String = \"Edit.ToggleOutliningExpansion\"<br \/>       Dim ts As TextSelection = DTE.ActiveDocument.Selection<br \/><br \/>       DTE.ExecuteCommand(cmd)<br \/>       ts.LineDown()<br \/><br \/>   End Sub<br \/><\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>When I use Visual Studio IDE to edit an XML file, I often come accross a big tree that is not easily to find my way out. So I start to collapse the expanded nodes. Unfortunately it might be very hard to do this.So I was looking for a macro to do it and found &hellip; <a href=\"http:\/\/panahy.nl\/index.php\/2010\/06\/01\/collapse-amp-expand-code\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Collapse &#038;amp Expand Code&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[65,63,66],"tags":[],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false,"post-thumbnail":false},"uagb_author_info":{"display_name":"Pouya Panahy","author_link":"http:\/\/panahy.nl\/index.php\/author\/pouya\/"},"uagb_comment_info":0,"uagb_excerpt":"When I use Visual Studio IDE to edit an XML file, I often come accross a big tree that is not easily to find my way out. So I start to collapse the expanded nodes. Unfortunately it might be very hard to do this.So I was looking for a macro to do it and found&hellip;","_links":{"self":[{"href":"http:\/\/panahy.nl\/index.php\/wp-json\/wp\/v2\/posts\/72"}],"collection":[{"href":"http:\/\/panahy.nl\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/panahy.nl\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/panahy.nl\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/panahy.nl\/index.php\/wp-json\/wp\/v2\/comments?post=72"}],"version-history":[{"count":0,"href":"http:\/\/panahy.nl\/index.php\/wp-json\/wp\/v2\/posts\/72\/revisions"}],"wp:attachment":[{"href":"http:\/\/panahy.nl\/index.php\/wp-json\/wp\/v2\/media?parent=72"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/panahy.nl\/index.php\/wp-json\/wp\/v2\/categories?post=72"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/panahy.nl\/index.php\/wp-json\/wp\/v2\/tags?post=72"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}