Adding custom fields to the footer (line/column bar at the bottom)

SyntaxEditor for WPF Forum

Posted 1 year ago by Andrea
Version: 17.2.0

Version= (Unsure of year)

How can I add custom data to the horizontal bar at the bottom of the script editor that shows the line number and column?

I think this is considered one of the "margins" (maybe SelectionMargin) but I'm not really sure which, in addition to not being sure how to add a label and data point. I don't seem to be able to access any of the margins from the SyntaxEditor XAML or a handle to the editor's name. 

I want to keep Line Number & Column Number. I just want to add another data point. 

            <syntax:SyntaxEditor Name="m_scriptText" DocumentTextChanged="OnDocumentTextChanged" DocumentTextChanging="OnDocumentTextChanging" Grid.Row="0" Margin="0" AcceptsTab="True" PreviewMouseLeftButtonUp="OnScriptTextPreviewMouseLeftButtonUp"
                                 FontFamily="{Binding FixedWidthFontFamily, Source={x:Static ui:GUIManager.Defaults}}" FontSize="14" ViewSelectionChanged="OnViewSelectionChanged" IsDelimiterHighlightingEnabled="True" CanSplitHorizontally="True"
                                 IsOutliningMarginVisible="True" IsLineNumberMarginVisible="True" IsIndicatorMarginVisible="True" IsRulerMarginVisible="False">

[Modified 1 year ago]

Comments (2)

Posted 1 year ago by Andrea

I just found this in the documentation:

"The SyntaxEditor.ViewMarginFactories property is a collection of IEditorViewMarginFactory objects. By default, it is auto-populated with the DefaultEditorViewMarginFactory, meaning all built-in margins are available. Add additional margin factories to the collection if you wish to add custom margins. A QuickStart is available in the samples that shows how to do this.


Where could I find these samples?

Posted 1 year ago by Actipro Software Support - Cleveland, OH, USA


If you download our WPF Controls installer from our web site, the samples are installed as part of that.  That's the easiest way to get going.

Or you can also find the SyntaxEditor QuickStarts source on GitHub.  The EditorViewMargin* QuickStarts have code related to customizing margins.

[Modified 1 year ago]

Actipro Software Support

The latest build of this product (v24.1.2) was released 3 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.