In this example, I am going to show you, how easy we can build the such kind of functionality in windows phone application, here I have considered an example called “diagnostic tool functionality” in your Windows Phone application using two main controls like Textbox and ScrollViewer.
Here is the basic steps to achieve diagnostic tool functionality in your application.
Step:1 Add ScrollViewer to Windows Phone Page, here I have added it, inside the Grid layout content panel.
Step:2 Add Textbox inside the ScrollViewer see the below code snippet for the same.
Step:3 Now we are going to move into .CS file; and declare the DispatcherTimer object to run the diagnostic concept eventually. Now initialize the DispatcherTimer’s object (i.e oTimer) and add a Tick event and set the time interval. you can refer the below code snippet for the same.
Step:4 In the Tick Event of DispatcherTimer, we are writing core logic of it, how to make text box scrollable.
Step:5 Finally we are going to run the timer, using the timer’s API called Start() method like oTimer.Start(); in this application I have use application bar button to run the timer on application bar button click.
Download: here is the example source code
Happy Coding –