Skip to main content

Microsoft Silverlight

Unanswered Question TextBox and external ScrollBar of the text editorRSS Feed

(0)

Ken Yeung
Ken Yeung

Member

Member

0 points

3 Posts

TextBox and external ScrollBar of the text editor

Hi, I'm a novice of MS Silverlight. Angel
I'd like to create a text editor like MS Word.
The application looks like a paper on a table or a platform. The paper with a TextBox is probably in A4 size.
As the height of the paper and the TextBox is usually larger than that of the screen, except zooming out the paper, VerticalScrollBar (and HorizontalScrollBar) is needed to scroll the paper up and down (and left and right).
When the user types at the end of the screen or browser, the ScrollBar should follow the caret, so that the paper is scrolled up automatically.

  1. I couldn't find how to set the application to follow the caret mentioned above.
  2. At the end of the paper, another new paper should be used to store additional words. If the editor creates a new paper when the ScrollBar of the TextBox is appear, another problem is encountered. When user deletes a word on the first paper, the first word of the second paper (another textbox) should be moved to the first paper. Are there any suggestions on the implementation?
Sorry for my poor English. Thanks. Smile

 

davidezordan
davidezo...

Contributor

Contributor

5686 points

873 Posts

Silverlight MVP

Re: TextBox and external ScrollBar of the text editor

Hi,

take a look at this controls:

http://www.vectorlight.net/silverlight_rich_textbox_demo.aspx

Thanks, Davide

Silverlight MVP

Blog Twitter Silverlight Experts

Ken Yeung
Ken Yeung

Member

Member

0 points

3 Posts

Re: TextBox and external ScrollBar of the text editor

Thanks for your reply, davidezordan.

Unfortunately, I think the editor of the given site may not help solve my problem as it uses internal scrollbar for its textbox and only one paper without table is used in view.

In my case, I want to use multi-textbox or other approaches to implement an editor with multi-paper/multi-page on a table visually. When scrolling, the table can be fixed or not be fixed, and papers are able to be scrolled up and down.

Look forward to more replies. Thanks.

shamrat231
shamrat231

Contributor

Contributor

4677 points

595 Posts

Re: TextBox and external ScrollBar of the text editor

Ken Yeung:

I want to use multi-textbox or other approaches to implement an editor with multi-paper/multi-page on a table visually. When scrolling, the table can be fixed or not be fixed, and papers are able to be scrolled up and down.

 

Hi,

you can make a multipage effect by adding the editor mentioned above on the tabcontrol, Create 20 tabItem in a tabControl and then richtextbox control on each tabItem. There you go , u now have 20 pages. Control it dynamically according to the pages you need. The above control comes with the source code which is available in this site in it gallery section. Download the code and modify it to suit your type of scrollber.

You can also add scrollbar to your your tabItem. 

and if the post was helpful then please 'Mark as Answer' - many thanks

Sharker Khaleed Mahmud
Software Developer
(MCP,MCTS,MCPD[web])

This credits that member, earns you a point and marks your thread as Resolved so we will all know you have been helped.

Dhaka, Bangladesh
LinkedIn :: SL Profile :: Blog

Ken Yeung
Ken Yeung

Member

Member

0 points

3 Posts

Re: TextBox and external ScrollBar of the text editor

Hi, shamrat231.

I have been to the gallery section and found the editor, but the download link is linking back to the author's web site.

I have played around with the tab control before, which can provide a lot of pages for me, but they are not continuous.

The problem of tracking caret position is still not solved.

Regards.

Cabral
Cabral

Member

Member

64 points

12 Posts

Re: TextBox and external ScrollBar of the text editor

try to use ScrollViewer control.

  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities