How can I control whether formatting uses spaces or tabs?

SyntaxEditor for WPF Forum

Posted 9 years ago by Craig - Varigence, Inc.
Version: 11.1.0542
Avatar
I'm using the syntax editor with the XML language add-on and I have a format function as follows:

private void OnFormat()
{
    var textFormatter = syntaxEditor.Document.Language.GetService<ITextFormatter>();
    if (textFormatter != null)
    {
        textFormatter.Format(syntaxEditor.Document.CurrentSnapshot.SnapshotRange);
    }
}
How can I control whether the TextFormatter uses spaces or tabs when indenting?

Thanks,

-Craig

Comments (1)

Posted 9 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Craig,

I believe the document.AutoConvertTabsToSpaces property controls that.


Actipro Software Support

The latest build of this product (v2019.1 build 0683) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.