richtextbox

Bind the text of RichTextBox from Xaml

How to Bind the text of RichTextArea from xaml ...

Measure String inside RichTextBox Control

Hi All Can somebody please explain how I would go about measuring the string inside a richtextbox control so that the I can automatically resize the richtextbox control according to its content? Thank you Edit: I've thought about it, and since the below answer won't work if there are different fonts in the RichTextBox Control, what i...

How to get the content of a RichTextBox?

I would like to get the content of a RichTextBox as a string wich contains the XAML. I seen some post wich show differents solutions with another class for parsing the xaml and transforms it into a stringbuilder. But, my goal is to have the XAML directly generated. Thanks ...

How to implement a rich label in WinForms?

Amazon has an address correction feature and I want to implement something similar. One problem I ran into is how to create a label that supports different formatting (like in the image). I could plunk down a browser control or a richtextbox control, but that seems like a massive overkill. Is there something simpler? Maybe an imp...

How to insert inline content from one FlowDocument into another?

I'm building an application that needs to allow a user to insert text from one RichTextBox at the current caret position in another one. I spent a lot of time screwing around with the FlowDocument's object model before running across this technique - source and target are both FlowDocuments: using (MemoryStream ms = new MemoryStream())...

Wrap text around image in rich textbox control

Ok, basically i have a vb6 app and i want to wrap the text in a rich text box around an image i have inserted into the rich text box from the clipboard. At the moment when you insert an image, the text does not wrap around the image... let me know if you need a screenshot of what i am trying to explain. Kind Regards, ...

Style property on Blocks/Inlines - Is there a way to get this?

I'm using the new RichTextBox control in SL4Beta and want to create styles for paragraphs and runs (blocks and inlines). I noticed that I can create a style for a <Block/>, like so: <Style x:Key="lvl2Paragraph" TargetType="Block"> <Setter Property="FontFamily" Value="Times New Roman"/> <Setter Property="FontStyle" Value="Italic"...

How to make a RichTextBox Transparent as well as Read-only Silverlight

As soon as i set the readonly property to true,the Transparency of the RichTextBox becomes greyish, so my RichTextBox no longer looks transparent. ...

Remove the ability to resize an image pasted into a richtextbox and add an event to that image. C#

I have searhed high and low for a solution to this problem. I have no problem adding an Bitmap image into the richtextbox. The problem is that I don't want it to have the resize option to it. I want that one image to be SELECTED when I click on it, just like in most messengers, and to throw an onclick event. Any help in this area wou...

Is there anyway that I can improve (wpf) richtextbox performance?

I am writing a text editor and right now if I type very quickly or hold down a key the typing gets very laggy. I was previously working on a winforms version of this program and there was no lag. Would it be possible for me to create a custom richtextbox control and strip out all of the unneeded properties? What would be the best way to ...

[WPF] How to register to/listen to richtextbox command's?

I'm creating a simple editor within our application using the WPF RichTextBox. Above it I've added the reguslar buttons like Bold, Italic, etc. These buttons use the RichTextBox's commands to set these properties, but next to these buttons, the commands also get send with CTRL+B, CTRL+I, etc. I want these buttons to represent the current...

WPF: RichTextBox typing TWICE slower than in a VB 5.0 RichTextBox ...

Hello, first this is no rant although its worth alone to put it on a blog... When I type very fast - having roughly 260 chars/minute - WPF`s RichTextBox starts swallowing chars and I have to stop writing that fast a => a.IsAnnoying = true; The same in a VB 5.0 RichTextBox fast as hell. Why is WPF again so great for? Customer satisfac...

Fire event on Word-Wrap

Hi All Is there some way to find out when the text gets wrapped (WordWrap) inside a RichTextBox? I've dug around quite a bit but haven't found anything so far, will keep looking though... The reason I'm looking into this is because I need an event to fire whenever the RichTextBox wraps the text at the end of the line. Thank you all ...

WPF, RichTextBox problem in getting the right textproperties at cursor position

I'm building a simple editor using the wpf richtextbox. This editor has some sort of toggle buttons for Bold, Italic, Underlined, etc. which are 'pressed' when the selected text or the text at the cursor has the approptiate property. I did it like this: private TextRange GetSelectedTextRange() { if(_richTextBox == null) return null; ...

Richtextbox library

I would like to use a JavaScript richtextbox library in my application. What library does Stack Overflow use, and is it available for me to use? ...

RichTextBox Scroll Sync and 16-bit Limit

I am synchronizing the vertical scroll events of two RichTextBox controls using the EM_SETSCROLLPOS/EM_GETSCROLLPOS method. While things seem to be working well for short text files, I am hitting the 16-bit limit with long text files. Specifically, when I have text over 65,535 pixel lines, the message handler appears to be scaling the sc...

C# WindowsApp TextBox with Special Characters

Hi, I would like to include a textbox / richtextbox in which I would like to include text such as "jogħġbok żomm din il-bieb magħluq". When I putting this text in the textbox/rightext box I am getting the following: jog&#295;&#289;bok &#380;omm din il-bieb mag&#295;luq Can you please help? I am getting the string from google tra...

Current line and column numbers in a RichTextBox in a Winforms application.

How do I get the current line and column numbers in a RichTextBox in a Winforms application? NOTE Folks, I just want a simple solution, if it's available by someone and he's willing to share it with us, and not links to do research! Just give me some code please! Otherwise, I'll have to buy a control... ...

Display formatted text in a window using python

I make a program in wxpython which displays questions to the user and a radiobox with answers. Questions and answers should be in a database and is formatted text using some mathematics (paranthesis, root squares etc). Could you propose me what widget I should use for such a text and what could be the database? Thanks. ...

DataGridTemplateColumn for individual control-column vs DataGridTextColumn

Hello, what is the difference, both works: DataGridTemplateColumn versus DataGridTextColumn both works means I can edit+display rich text in the cell. <DataGridTemplateColumn Header="Homework"> <DataGridTemplateColumn.CellTemplate> <DataTemplate> <RichTextBox > ...