Hi
What's the best way to hide several lines of code. I tried to hide the lines with
ICSharpCode.AvalonEdit.TextEditorTextArea.TextView.CollapseLines
But that results in an exception after clicking inside the text area:
System.NullReferenceException was unhandled
HResult=-2147467261
Message=Object reference not set to an instance of an object.
Source=ICSharpCode.AvalonEdit
StackTrace:
at ICSharpCode.AvalonEdit.Rendering.TextView.GetOrConstructVisualLine(DocumentLine documentLine)
at ICSharpCode.AvalonEdit.Editing.Caret.ValidateVisualColumn()
at ICSharpCode.AvalonEdit.Editing.Caret.get_Position()
at ICSharpCode.AvalonEdit.Editing.SelectionMouseHandler.textArea_MouseLeftButtonDown(Object sender, MouseButtonEventArgs e)
at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
...
Thanks for help...