richtextbox

Can't insert a picture into RichTextBox

I want to insert a picture into a RichTextBox. I add the picture in coding. This is the major code, adding a jpg image: MemoryStream memoryStream = new MemoryStream(); img.Save(memoryStream,System.Drawing.Imaging.ImageFormat.Jpeg); byte[] bytes = memoryStream.ToArray(); String width = img.Width.ToString(); String height = img.Height.To...

RichTextBox & Disabling Mouse Scrolling

I want to use the mouse middle button to clear a RichTextBox, but it also activates a mouse scrolling functionality similar to what you find in web broswers. When the vertical scrollbar is visible (there's enough data) and you press the middle button in the mouse a scrolling cursor appears and you can scroll up or down by moving the curs...

richtextbox text range attributes -- protected, hidden, backcolor, etc -- can i set them without selecting a range?

i want to be able to protect, hide, and highlight different ranges of text within a richtextbox without actually selecting the text -- which is what you seem to have to do for the SelectionProtected and SelectionBackColor or w/e properties. how can i do this programatically? I looked around in reflection and found the SetCharFormat met...

How can I create an html input text area such that I can underline or format certain words?

I'd like an input field that I can have javascript set certain attributes for, for different parts of the input field. A simple example to demonstrate what I'd like to do: let's say I want to underline all curse words in an input text area. So the javascript would check the input text area when a new letter is inserted, and for any word...

Silverlight 4 RichTextBox and Empty Runs

Does anyone know why the RichTextBox in SL4 does not apply formatting properties if the run is empty. This causes a big problem when trying to bind a toolbar to the control. It does not report what one would expect should be there. For instance if a I have 5 lines 1) Text 2) Empty Run 3) Empty Run 4) Empty Run 5) Text And apply a new...

Fullscreen richtextbox in silverlight

I have a dataform with a richtextbox In it. The user can type some text and have some editing capability, but I'd like to give the user the option to expand the editor to fullscreen to have more richtextbox editing options. How can I implement a function that will allow me to fullscreen (or atleast create a bigger window) the richtextedi...

How can I get Underline and bullet positions in WPF RichTextBox

For a WPF RichTextBox, is there a way to obtain the co-ordinates of the text decorations, such as the stroke applied for Underlining? the co-ordinates as well as the shape\character used for bullets in bulleted list? ...

Can I calculate\control the offset where underline is positioned in RichTextBox?

Is there some way to calculate the offset at which WPF renders Underline in text in a RichTextBox? Can I change this offset? ...

Display Special Characters (Korean Letters) in RichTextBox

Hi, My question might be a little bit confusing, but I think it's still worth of paying some attention. Basically I'm designing a program to display all printable Unicode characters in a RichTextBox. I'm using VC# 2010 Express Edition. However, the RichTextBox has a critical problem: some special characters cannot be displayed correc...

Get the scroll position from a RichTextBox?

I've created a highlighting mechanism for a RichTextBox in Silverlight 4. It'll get character positions and draw rectangle(s) over the text. The trouble I have now is with scrolling on the RichTextBox. As I scroll all of my precious highlighting gets left behind. Is there any way I can add an event handler to a scroll event and/or a ...

Programmatically Simulate a KeyDown Event for RichTextBox in C# 2010

Hi, I have a RichTextBox on my form, and I want to use the default behavior as the RichTextBox does, such as, Ctrl+Z (Undo) or other actions (Ctrl+Y, Ctrl+X, Ctrl+V). If users use the shortcut keys (Ctrl+Z), it's perfect. But what if the users click a ToolStripButton? How can I programmatically simulate a KeyDown Event for RichTextBo...

How to get Flow document elements from the richtextbox selection

Is there a way to get the flow document element object (etc Paragraph, Image,) from the wpf richtextbox selection? If not, is there a way to do it? ...

How can we extract actual font family from a CompositeFontFamily applied to a run in WPF RichTextBox

A composite font family is a collection of FontFamilies. On applying the composite font to a run, appropriate font from its font-collection is applied depending on text. How can we get which actual font is being used in a run on which a composite font has been applied? EDIT2: Suppose I have a run <Run Text="Some text with different u...

how to add emoticons(smileys) into WPF richtext box

I have a WPF IM chat window with a input textbox and a output richtext box. I want to render input text on the richtext box. When user enter a smiley symbol like :) into the text block with some texts, I want to replace that text smiley with predefined smiley image and render on the richtext box. It's very similar to gtalk chat window be...

C# copy-paste dillema

Ok, this will be a long one: I started working on a simple OpenGL-SL IDE and I started the implementation of a text highlighter. Until now everything works fine: I have a class with some methods that check for different keywords on a string and change a RichTextBox's text color. The main method which handles all of the text painting is...

Mouse selection too smart -- gets more than the text I want

I have a RichTextBox. When I select words in the text box, the text actually selected jumps to include other characters that I have not moved the mouse over. This is particularly annoying when I have XML in my text box. I try to grab the beginning tag, and Windows (or the RichTextBox control) also grabs the close angle-bracket tag from ...

CKeditor skins, good ones and how to build them?

Hi, I was wondering if there is a resource of CKeditor skins anywhere? Like a list of downloadble skins. The default one is a little meh. Also where are the doc's for creating your own skin? Thanks! ...

UpdateLayeredWindow causes black blocks on certain controls.

Hello everyone, I am currently having an issue while using UpdateLayeredWindow. The Issue: It seems that when using skinned interfaces on Windows (Aero and such) UpdateLayeredWindow causes issues with specific controls. By this I mean, for example, if a simple edit box has a right-side scroll bar, it will turn black when a user hovers t...

How can I use NLog's RichTextBox Target in WPF application?

How can I use RichTextBox Target in WPF application? I don't want to have a separate window with log, I want all log messages to be outputted in richTextBox located in WPF dialog. I've tried to use WindowsFormsHost with RichTextBox box inside but that does not worked for me: NLog opened separate Windows Form anyway. ...

How to format plain text in WPF RichTextBox

hi everyone, I have developed a small chat client using WPF. In each chat window, it contains a richtextbox to display previous chat conversations and a textbox with send button to type a chat message. I want to format the display text in the richtextbox as shown below. user1: chat message goes here For the time being, I use AppendTex...