Doing the following leads to what I think are unexpected results:
- Create a simple WPF project with a SyntaxEditor in a grid in a window:
<Window x:Class="TestSyntaxEditorSizing.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:editor="http://schemas.actiprosoftware.com/winfx/xaml/syntaxeditor" Title="MainWindow" Height="350" Width="525"> <Grid> <editor:SyntaxEditor /> </Grid> </Window>
- Type text into the editor longer than the window is wide - this should make the horizontal scrollbar display, shrink, and move to the right to display the latest text.
- Grab the right edge of the window and grow the window.
Now, I would expect that as the window grows, the text that had been previously hidden would begin to display on the left side of the editor, and the last character entered would remain at the right edge of the editor. However, what happens instead is that the text does not move, you simply get more empty white space on the right side of the editor. This behavior seems wrong, and is not in line with what most other text editors do. Is there something I can do to change this behavior, or am I stuck with it?