Click here to Skip to main content
15,916,318 members
Home / Discussions / WPF
   

WPF

 
Questioncentering cursor and object Pin
sadas232341s1-Nov-09 7:57
sadas232341s1-Nov-09 7:57 
AnswerRe: centering cursor and object Pin
Mark Salsbery1-Nov-09 11:16
Mark Salsbery1-Nov-09 11:16 
GeneralRe: centering cursor and object Pin
sadas232341s1-Nov-09 20:17
sadas232341s1-Nov-09 20:17 
GeneralRe: centering cursor and object Pin
Mark Salsbery2-Nov-09 8:27
Mark Salsbery2-Nov-09 8:27 
GeneralRe: centering cursor and object Pin
sadas232341s3-Nov-09 21:32
sadas232341s3-Nov-09 21:32 
QuestionHow can I determine if content fits control? Pin
fjparisIII31-Oct-09 16:01
fjparisIII31-Oct-09 16:01 
AnswerRe: How can I determine if content fits control? [modified] Pin
#realJSOP1-Nov-09 1:03
professional#realJSOP1-Nov-09 1:03 
GeneralRe: How can I determine if content fits control? Pin
fjparisIII1-Nov-09 4:40
fjparisIII1-Nov-09 4:40 
John Simmons / outlaw programmer wrote:
I believe you can see if the control "requires scrolling" after setting the content.


The "content" of a RichTextBox is a FlowDocument which is a ContentElement, but I don't see any properties that specify whether a ContentElement "requires scrolling." Likewise for the derived class, RichTextBox. What event could I look for that would tell me that?

John Simmons / outlaw programmer wrote:
You may have to add a handler for the ContentRendered event for the control because the necessary properties may not be set until the content is rendered. I'm not sure about this though.


In MSDN, I could only find two classes that receive a ContentRendered event: Window and Frame, and RichTextBox isn't derived from either, and so the ContentRendered event doesn't show up as an event that RichTextBox can receive.

If there were a way to get the ScrollViewer from the RichTextBox, that would give me something else to investigate, but I don't see how you can do that, either.
GeneralRe: How can I determine if content fits control? Pin
#realJSOP1-Nov-09 6:02
professional#realJSOP1-Nov-09 6:02 
GeneralRe: How can I determine if content fits control? Pin
fjparisIII1-Nov-09 6:40
fjparisIII1-Nov-09 6:40 
GeneralRe: How can I determine if content fits control? Pin
#realJSOP1-Nov-09 9:05
professional#realJSOP1-Nov-09 9:05 
GeneralRe: How can I determine if content fits control? Pin
fjparisIII1-Nov-09 9:57
fjparisIII1-Nov-09 9:57 
GeneralRe: How can I determine if content fits control? (Solved) Pin
fjparisIII1-Nov-09 10:41
fjparisIII1-Nov-09 10:41 
GeneralRe: How can I determine if content fits control? (Solved) Pin
#realJSOP1-Nov-09 23:09
professional#realJSOP1-Nov-09 23:09 
GeneralRe: How can I determine if content fits control? (Solved) Pin
#realJSOP2-Nov-09 0:04
professional#realJSOP2-Nov-09 0:04 
GeneralRe: How can I determine if content fits control? Pin
#realJSOP1-Nov-09 9:23
professional#realJSOP1-Nov-09 9:23 
QuestionMS RibbonBar Pin
#realJSOP30-Oct-09 12:48
professional#realJSOP30-Oct-09 12:48 
AnswerRe: MS RibbonBar Pin
Christian Graus30-Oct-09 14:07
protectorChristian Graus30-Oct-09 14:07 
GeneralRe: MS RibbonBar Pin
#realJSOP30-Oct-09 23:50
professional#realJSOP30-Oct-09 23:50 
AnswerRe: MS RibbonBar Pin
Mark Salsbery30-Oct-09 15:45
Mark Salsbery30-Oct-09 15:45 
GeneralRe: MS RibbonBar Pin
Christian Graus30-Oct-09 17:10
protectorChristian Graus30-Oct-09 17:10 
GeneralRe: MS RibbonBar Pin
Mark Salsbery30-Oct-09 17:33
Mark Salsbery30-Oct-09 17:33 
GeneralRe: MS RibbonBar Pin
#realJSOP30-Oct-09 23:55
professional#realJSOP30-Oct-09 23:55 
QuestionCalling property from silverlight page Pin
Deabdy2129-Oct-09 3:40
Deabdy2129-Oct-09 3:40 
AnswerRe: Calling property from silverlight page Pin
Mark Salsbery29-Oct-09 6:52
Mark Salsbery29-Oct-09 6:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.