Provide a way to remove line numbers

5 posts, 0 answers
  1. Patrick
    Patrick avatar
    459 posts
    Member since:
    Aug 2012

    Posted 21 Oct 2019 Link to this post

    Hello,

    In some uses, they are not useful.

  2. Petar Mladenov
    Admin
    Petar Mladenov avatar
    3127 posts

    Posted 23 Oct 2019 Link to this post

    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.
  3. Patrick
    Patrick avatar
    459 posts
    Member since:
    Aug 2012

    Posted 23 Oct 2019 in reply to Petar Mladenov Link to this post

    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.

  4. Petar Mladenov
    Admin
    Petar Mladenov avatar
    3127 posts

    Posted 28 Oct 2019 Link to this post

    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.
  5. Petar Mladenov
    Admin
    Petar Mladenov avatar
    3127 posts

    Posted 28 Oct 2019 Link to this post

    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.
Back to Top