Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7997665
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T15:00:59+00:00 2026-06-04T15:00:59+00:00

Basically, I’m developing a note-taking app where the user can type as long as

  • 0

Basically, I’m developing a note-taking app where the user can type as long as he wants (kinda like Scrollable TextBox in WP7). I put the TextBox in a ScrollViewer, and everything is fine; I disable the ScrollViewer when the TextBox gets focus, so it scrolls automatically while the user is typing.

My problem is, I want the user to be able to scroll while editing the note, just as he’s able to scroll while reading the note. I thought the only way to do this would be to hold down until the oversized caret appears, then moving it around, but I discovered that, in fact, third party apps support this type of scrolling.

What I’m trying to achieve is something like Word/OneNote on the phone, where the user can easily scroll while editing the document (here’s a video demonstrating it). The same effect is seen in the Skype and Facebook apps where, while writing a message, you can scroll it to see more of it.

I wonder if this is a custom control, or if the layout was designed in a specific way, because a TextBox inside a ScrollViewer simply doesn’t work.

I’d appreciate any help. Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T15:01:00+00:00Added an answer on June 4, 2026 at 3:01 pm

    Based on the answer given by Ku6opr, I tweaked the code so it works under my circumstances. Now, the TextBox has regular behavior, but is scrollable, and the RootFrame doesn’t go up automatically.

    XAML:

    <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
        <ScrollViewer x:Name="InputScrollViewer">
            <TextBox x:Name="MessageText" TextWrapping="Wrap" Text="" AcceptsReturn="True" TextChanged="inputText_TextChanged" GotFocus="MessageText_GotFocus" Padding="0,0,0,400" Tap="MessageText_Tap" />
        </ScrollViewer>
    </Grid>
    

    C#:

    public partial class MainPage : PhoneApplicationPage
    {
        double InputHeight = 0.0;
    
        // Constructor
        public MainPage()
        {
            InitializeComponent();
        }
    
        private void MessageText_GotFocus(object sender, System.Windows.RoutedEventArgs e)
        {
            (App.Current as App).RootFrame.RenderTransform = new CompositeTransform();
        }
    
        private void inputText_TextChanged(object sender, System.Windows.Controls.TextChangedEventArgs e)
        {
            Dispatcher.BeginInvoke(() =>
            {
                double CurrentInputHeight = MessageText.ActualHeight;
    
                if (CurrentInputHeight > InputHeight)
                {
                    InputScrollViewer.ScrollToVerticalOffset(InputScrollViewer.VerticalOffset + CurrentInputHeight - InputHeight);
                }
    
                InputHeight = CurrentInputHeight;
            });
        }
    
        public void MessageText_Tap(object sender, GestureEventArgs e)
        {
            InputScrollViewer.ScrollToVerticalOffset(e.GetPosition(MessageText).Y - 80);
        }
    }
    

    The Tap event handlers detects the vertical position of the tap, and scrolls the ScrollViewer so the caret is in view when the TextBox gets focus.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Basically, I would like a brief explanation of how I can access a SQL
Basically, I need to adjust the font type everywhere it isn't specified. How can
Basically I would like to store the address of a pointer in a buffer.
Basically I'd be looking to implement a method like this. IQueryAble GetQuery<T>(Entities db) or
Basically, I would like to decode a given HTML document, and replace all special
Basically what I am doing is giving a user a list of terms via
Basically from a database I am getting data that is formatted like this nameofproject101
Basically, I'm implemeting a reversi app for android for my year 13 coursework and
basically i would like to display .doc file in WWW, i've tried to fetch
Basically, I would like a page that consist of a slideshow that contains a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.