How can I control whether formatting uses spaces or tabs?

SyntaxEditor for WPF Forum

Posted 10 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 10 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 (v2020.1.1) was released 11 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.