mono / xwt

A cross-platform UI toolkit for creating desktop applications with .NET and Mono
MIT License
1.37k stars 241 forks source link

[WPF] ScrollView: horizontal scroll does not work #485

Open henriquemotaesteves opened 9 years ago

henriquemotaesteves commented 9 years ago

xwt-wpf-scrollview-horizontalscrolldoesnotwork

public class MainWindow : Window
{
    public MainWindow()
    {
        var textEntry1 = new TextEntry { MultiLine = true };

        var scrollView1 = new ScrollView(textEntry1)
        {
            HorizontalScrollPolicy = ScrollPolicy.Always,
            VerticalScrollPolicy   = ScrollPolicy.Always
        };

        for (var i = 0; i < 100; i++)
        {
            textEntry1.Text += "3.14159265358979323846264338327950288419716939937510\n";
        }

        this.Content = scrollView1;
        this.Title   = "XwtTest";
        this.Height  = 150;
        this.Width   = 200;
    }
}
sevoku commented 9 years ago

It looks like the ScrollViewer or CustomScrollViewPort have some problems with the builtin scrolling capabilities of a TextBox. Packing a TextBox into an other Box (and then into a ScrollView) doesn't help either. Even more, it doesn't depend on enabled Multiline.

@ermau, @DavidKarlas: any ideas?