Silverlight: Scroll issue with RichTextBox Selection property -


i have grid in silverlight having lot of different controls. in last row of grid, have richtextbox.

to write in richtextbox, first have scroll down because controls much.

each time open grid, controls initiated initial data. there problem line

this.rtb.selection.text = "initial text";

what line is, set text richtextbox control , set focus on it, result scroll bar move bottom, annoying.

i want text assigned scroller should stay @ top.

try this:

// create paragraph paragraph prgparagraph = new paragraph();  // create text, , add paragraph run rnmytext = new run(); rnmytext.text = "this example text ";  prgparagraph.inlines.add(rnmytext);  // add paragraph rtb rbtmyrichtextbox.blocks.add(prgparagraph); 

Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -