ToggleOutliningExpansionAction CanExecute

SyntaxEditor for WPF Forum

Posted 10 years ago by Kasper
Version: 12.2.0570

Hi guys,

This is a very simple question: Why is the ToggleOutliningExpansionAction enabled even when the cursor is not near a piece of foldable code? I would expect that it would only be visible if I have already used "Hide selection" on a range of code and then placed the cursor somewhere within it, but that doesn't seem to be the case. 

I'm pretty sure that I could work around this if it's by-design, but if not, perhaps you would like to fix it for the next maintenance release. Or perhaps I'm simply not getting how this action should work? :)

Comments (1)

Answer - Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA

Hi Kasper,

I believe we didn't do that since command can-execute calls get run a lot and checking to see if the caret is in a collapsible range (not to mention similar lookups for other can-executes on related outlining commands) will be relatively expensive calls.  We didn't want to bog down the entire can-execute process with that lengthier sort of lookup.

Actipro Software Support

The latest build of this product (v22.1.3) was released 29 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.