0

Following picture shows my project.

My project

Here is XAML code for your testing needs.

<Window x:Class="MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="200" Width="525">

<ScrollViewer Name="ScrollViewer1" Height="67" VerticalAlignment="Top">
    <StackPanel>
        <TextBox Name="TextBox1" Text="TextBox1"/>
        <TextBox Name="TextBox2" Text="TextBox2"/>
        <TextBox Name="TextBox3" Text="TextBox3"/>
        <TextBox Name="TextBox4" Text="TextBox4"/>
        <TextBox Name="TextBox5" Text="TextBox5"/>
        <TextBox Name="TextBox6" Text="TextBox6"/>
    </StackPanel>
</ScrollViewer>

</Window>

Following picture shows my question;

Question

So, how to click WPF ScrollViewer down button in order to go end of ScrollViwer?

2 Answers 2

1

A solution could be to subscribe to the click of that button like here https://stackoverflow.com/a/4932118/6890102, then call the ScrollToEnd() method of the ScrollViewer. But there might be a better solution.

Sign up to request clarification or add additional context in comments.

Comments

1

Right-Click on ScrollViewer->Edit Template->Edit a Copy, to see the Scrollviewer's Template. The ScrollViewer contains a ScrollBar. A ScrollBar contains, RepeatButton, and a Track. The RepeatButton is responsible for the up and down movement of the scrollbar. Try checking it. You may find some idea on how to implement your objective.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.