HorizontalScrollBarVisibility="Auto"

SyntaxEditor for WPF Forum

Posted 6 years ago by SvenG - VIPA
Version: 17.2.0662
Avatar

Hello,


I use HorizontalScrollBarVisibility="Auto" on the SyntaxEditor and expected it to behave like it does with all other WPF controls: if the content fits in the control the scrollbar is not visible. If the content is larger it will show the scrollbar.
Instead it is always visible and behaves like HorizontalScrollBarVisibility="Visible"

The MSDN extract for Auto Mode is:
"A ScrollBar appears and the dimension of the ScrollViewer is applied to the content when the viewport cannot display all of the content. For a horizontal ScrollBar, the width of the content is set to the ViewportWidth of the ScrollViewer. For a vertical ScrollBar, the height of the content is set to the ViewportHeight of the ScrollViewer." (MSDN)

Is this a bug or is there any other way to achieve that the scrollbar hides when not needed ?

Comments (1)

Posted 6 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Sven,

We current coerce Auto to be like Visible since we don't have auto mode support just yet.  We didn't want to make a breaking change down the road so we used the built in HorzontalScrollBarVisibility enum for that property.

We are currently working on doing a major refactoring of the internals of SyntaxEditor.  Auto scrollbar visibility is something we are going to be looking into as we get into that area.  We'd like to get that into a future version.  Sorry there isn't currently a way to mimic that behavior.


Actipro Software Support

The latest build of this product (v24.1.1) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.