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 ?