Hi,
I am creating Visual Studio 2012 extension following MSDN Walkthrough: Outlining article (I am sorry for not providing link, this forum does not allow me) and all works as expected (I.e. I am able to create my own outlining regions) until I want my newly created outlining regions to collapse by default.
What I do is changing following example code from the walkthrough from
yield return new TagSpan<IOutliningRegionTag> ( new SnapshotSpan(startLine.Start + region.StartOffset, endLine.End), new OutliningRegionTag(false, false, ellipsis, hoverText) );
to
yield return new TagSpan<IOutliningRegionTag> ( new SnapshotSpan(startLine.Start + region.StartOffset, endLine.End), new OutliningRegionTag(true, false, ellipsis, hoverText) );
So basically I only change the first parameter (bool isDefaultCollapsed) ofOutliningRegionTag constructor from 'false' to 'true' and I expect the region to be collapsed by default after it is created. Unfortunately my regions are still expanded and react only to manual collapse/expand by clicking the +/- symbols.
Is my expectation wrong? Do I understand something wrong? Is there any other way to achieve what I want (i.e. having newly created outline regions collapsed on demand)?
Thank you,
Otakar Nieder