Vertical scrollbar thumb issue with word wrap

SyntaxEditor for WPF Forum

Posted 4 months ago by Alex
Version: 24.1.3
Platform: .NET 6.0
Environment: Windows 11 (64-bit)
Avatar

Hello,

We have noticed an issue with the vertical scrolling of SyntaxEditor, when word wrap is enabled. If the content consist of strictly a single, very long paragraph with no line break (no \r\n or \n), the thumb size of the vertical scroll bar will remain as big as the scroll bar itself. Which means it is not possible to scroll through the content by simply dragging the thumb. Scrolling with the mouse wheel works.

To reproduce:

  1. Create a new WPF application
  2. Use the following code in MainWindow
    <Window x:Class="WpfApp1.MainWindow"
            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
            xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
            xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
            xmlns:act="http://schemas.actiprosoftware.com/winfx/xaml/syntaxeditor"
            xmlns:local="clr-namespace:WpfApp1"
            mc:Ignorable="d"
            Title="MainWindow" Height="300" Width="500">
        <Grid>
            <act:SyntaxEditor AllowDrop="True"
                                VerticalContentAlignment="Stretch"            
                                CanSplitHorizontally="False"
                                FontFamily="Consolas"
                                HorizontalScrollBarVisibility="Hidden"
                                VerticalScrollBarVisibility="Auto"
                                ZoomModesAllowed="None"
                                IsTextDataBindingEnabled="True"
                                IsOutliningMarginVisible="True"
                                IsSelectionMarginVisible="False"
                                IsDelimiterHighlightingEnabled="True"
                                IsViewLineMeasureEnabled="True"
                                WordWrapMode="Word"></act:SyntaxEditor>
    
        </Grid>
    </Window>​
  3. Copy the following text in the editor (again, no newline)
    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce pharetra fermentum sem, et condimentum libero commodo eleifend. Nullam ipsum purus, semper ut mauris sed, congue faucibus ligula. Maecenas ut lectus at velit elementum mattis. Ut viverra tellus ut diam sollicitudin fermentum. Proin ullamcorper tincidunt urna, quis vulputate leo consequat nec. Vivamus imperdiet dignissim massa et commodo. Vestibulum vitae est nec neque aliquam tristique. Maecenas finibus turpis odio. Proin egestas, ipsum et pretium hendrerit, nisl diam posuere justo, vitae lacinia orci mi non odio. Proin quis massa et justo vestibulum gravida. Integer a interdum mauris. Quisque malesuada mauris a pharetra pellentesque. Pellentesque et eros id nibh aliquam efficitur et non urna. Etiam non viverra augue, in eleifend lectus. Morbi aliquet elit vel porttitor sagittis. Sed finibus condimentum lectus, vel finibus felis ultricies laoreet. Duis consectetur consequat lectus, quis finibus augue fermentum ut. Quisque cursus ipsum a elementum iaculis. Sed nec quam eget tellus suscipit blandit ac hendrerit mi. Nunc nec hendrerit nibh. Ut at lorem imperdiet, aliquam nisi eget, vehicula erat. Morbi malesuada sed libero non aliquam. Nullam tempor turpis arcu, convallis vehicula ligula bibendum ac. Morbi tristique diam ut erat congue pretium. Cras dictum ultrices quam, a pulvinar orci laoreet quis. Sed consequat finibus orci, et laoreet ipsum posuere ac. Sed ut elit ligula. Suspendisse potenti. Duis quis lobortis erat. Donec ornare tellus eu sapien efficitur viverra. 
  4. Resize the window in a way that the scroll bar is visible.

The scroll bar thumb size never changes (height remains at it's maximum value), and moving either the thumb or clicking the scroll bar up/down buttons doesn't scroll the text all the way up or down. Only the mouse wheel allows scrolling through the content.

Thanks for your help.

Comments (3)

Answer - Posted 3 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Alex,

Thank you for reporting this.  I believe we tracked down the issue and have fixed it for the next release.


Actipro Software Support

Posted 3 months ago by Alex
Avatar

OK thank you for your fast reply!

By next release, you mean the next minor version of 24.1 or the next major version 25.1?

Have a good day,

Alex

Posted 3 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Alex,

It will be in the next v24.1 update.


Actipro Software Support

The latest build of this product (v24.1.5) was released 4 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.