This is a migrated thread and some comments may be shown as answers.

Provide a way to remove line numbers

4 Answers 152 Views
SyntaxEditor
This is a migrated thread and some comments may be shown as answers.
Patrick
Top achievements
Rank 2
Iron
Iron
Iron
Patrick asked on 21 Oct 2019, 02:07 PM

Hello,

In some uses, they are not useful.

4 Answers, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 23 Oct 2019, 08:33 AM

Hello Patrick,

Thank you for your overall interest in this new component which is in Beta state now. Any feedback is greatly appreciated. We will try to address such questions which need additional documentation for the upcoming official Release in R1 2020. The LineNumberMargin control which draws the line numbers reside in the Margin collections of the RadSyntaxEditor. You can remove it the following way:

            InitializeComponent();
            this.syntaxEditor.Margins.ScrollableLeft.RemoveAt(0);

Regards,
Petar Mladenov
Progress Telerik

Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
0
Patrick
Top achievements
Rank 2
Iron
Iron
Iron
answered on 23 Oct 2019, 08:54 AM

Hi Petar,
Thank you for your answer.

I can use this as a workaround, but not a final solution: "RemoveAt (0)" seems to use a magical number, it couéd break if the control changes. In addition, it needs code and cannot be used in a XAML style definition.

A much better solution would be to have a ShowLineNumbers dependency property, with a default value of "true". This way, no need to change the user code if the control changes.

0
Petar Mladenov
Telerik team
answered on 28 Oct 2019, 07:33 AM

Hello Patrick,

I agree with you and logged a public feedback item which you can follow in order to receive future notifications for status changes.

Regards,
Petar Mladenov
Progress Telerik

Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
0
Petar Mladenov
Telerik team
answered on 28 Oct 2019, 07:33 AM

Hi Patrick,

Here is the link to the item:

SyntaxEditor: Add ShowLineNumbers dependency property

Regards,
Petar Mladenov
Progress Telerik

Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Tags
SyntaxEditor
Asked by
Patrick
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Petar Mladenov
Telerik team
Patrick
Top achievements
Rank 2
Iron
Iron
Iron
Share this question
or