richtextbox

WPF RichTextBox tab selection eating up system memory!

Hi I have a TabControl in WPF / MVVM that is bound to an ItemsSource on top of an ObservableCollection. Each tab has its own collections and bindings with components such as Images, Richtextboxes, and user input boxes, and everything seems to work well. However, I have noticed that each time I switch a tab, it uses about 100k of syste...

reflect the style of a char in wpf`s richtextbox in the state of a togglebutton IsChecked false/true

Hello folks, my first post and a difficult too. I have found any information on msdn forum or google. So I hope to meet a wpf master here. 1.) I have a ToggleButton and a RichTextBox. 2.) I enter text in the RichTextBox , select Text and press the ToggleButton to make the text bold 3.) I set the caret between the bold formatted text an...

WPF: fast way to apply formatting to RichTextBox

I'm trying to display basic syntax highlighting in a WPF RichTextBox. It mostly works, but the rendering performance is awful. First I naively tried: /// <summary> /// Main event handler for syntax highlighting. /// </summary> private void XmlChanged(object sender, TextChangedEventArgs e) { VM.Dirty = true; if (VM.Pretty) ...

Copy from Ms Word and paste into Rich Textbox problem

Hi everybody, I have a problem when pasting ms word content into richtextbox. when I copy content of word document and paste it into richtextbox which is in a windows application written in C#. the links are shown like that ; This is test.. Go to Google. <http://www.google.com&gt; Mail : Project <mailto:[email protected]> The issue can a...

Font size mismatch between RichTextBox and Word

I have a small WPF application that hosts a RichTextBox: <RichTextBox SpellCheck.IsEnabled="True" FontFamily="Verdana" AcceptsTab="True" AcceptsReturn="True" FontSize="14" /> As shown the code snippet above, I set the font size to 14. If I copy text from this RichTextBox to Microsof...

VB.NET Rich TextBox Newline Character removal

I am using a Rich TextBox in VB.NET and passing to a StringBuilder. I need to replace the New Line character from the TextBox with either a space or a comma. Problem is the standard codes for new line don't seem to be picking up this New Line character in this case. Is there a specific character used in Rich TextBoxes as the New Line? An...

RichTextBox (.NET Winforms) problem (or alternative)

Hello! I have a problem with .Net's RichTextBox control. It seems that it doesn't support table cell formatting, which is funny because most of the time I create tables I want the cell contents to be right-aligned (numbers, currency). If I try to open a WordPad document in RichTextBox, it ignores (and actually removes) the commands fo...

Save and retrieve RichTextBox.Document from/to SQL?

Hello all. I want to use a Wpf RichTextBox to edit data and resave it to SQL field. I need of course the text to be saved as rich text, not just simple text of course. What data-type should be best for storing in SQL server (2005 - forget about file stream)? How do I save/retrieve it? ...

RichTextBox Replacement Winforms .NET2.0+

I have been extending the RichTextBox control in VS2008 using C# (adding printer support and URL links). I have most of the functionality I need but the control is not that good. I do not know how to change the mouse cursor for image sizing handles. Bullets get out of wack with the size and colour. I need this for winforms not asp.net or...

WPF RichTextBox - Replace Selected Text with Custom Control

Before I start hacking in a really crude solution, I thought I'd see if someone could give me a little nudge in the right direction. What I really want to do is let a user select some text in a RichTextBox, click a button, and convert that text into a custom rendered control. Convert it to a Button containing the text they had selected...

Set font properties in RichTextBox

HI, I am developing an editor using RichTextBox in WPF, i have to implement feature that user can set font of selected Text if some text is selected, if nothing is selected then font should be set for new text. If i set the font properties(like FontStyle,FontSize) of RTB in later case it will set the properties for whole text, How can i...

Reading PDF in C#

I want to read and display the contents of the PDF files into my RichtextBox. I am using windows application C#. Is it possible? What is the way to do it? ...

How to mapping richtextbox size with papersize?

I have created WPF RichTextBox and ComboBox, I want to set size of RichTextBox mapping with paper size set at ComboBox which contain value such as A4, Letter, etc. How to do that? ...

Set RTF text into WPF RichTextBox control

Hi, I have this RTF text: {\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Arial;}} {\colortbl ;\red0\green0\blue0;\red255\green0\blue0;} \viewkind4\uc1\pard\qc\cf1\fs16 test \b bold \cf2\b0\i italic\cf0\i0\fs17 \par } How to set this text into WPF RichTextBox? Solution: public void SetRTFText(string ...

C#/WPF: Disable Text-Wrap of RichTextBox

Hi, Does anyone know how I can disable the text wrapping of a RichTextBox? E.g. if I have a large string which doesn't fit in the window, the RichTextBox places the part of the string which can't be shown of a new line. I want to disable that (and make it visible only by using the Scrollbar). Thanks a lot. Cheers ...

DevExpress Report with richTextBox

Hi, I am using WPF RichTextBox to record data and save the same in database. Now when i retrieve the same back from database and try to show the detail in a DevExpress report RichTextBox value appears as a single line of text without line break or new lines or table format. This is what i am doing Converting FlowDocument to byte[] to s...

Catching event when a link is clicked in a Textbox displaying richtext

In Microsoft Access 2007 the Textbox can be set to display a cut-down version of HTML as richtext. However, there does not seem to be an easy way to detect what has been clicked within the box itself. For instance, you can display a classic HTML <a> tag that appears as a link but clicking it doesn't generate any event. I'd like to know...

c# - perfect syntax highlighting

Hello, I'm looking for a RichTextBox with syntax highlighting! Sounds easy but I'm searching since months and didn't find that what I need. First I started to do it by myself... No good idea... I tried to use this: http://blogs.microsoft.co.il/blogs/tamir/archive/2006/12/14/RichTextBox-syntax-highlighting.aspx but that code don't hand...

C# How can I set the color of text in a richtextbox?

Hi all, I have a richtextbox in an app and I'd like key words to be in another color, how can I do this? Thanks Jade ...

Rectangular BackColor of selection in RichTextBox

Background: I'm going to start studying/coding at the local university's library. Since I'm not a student, I won't be able to utilize their wireless internet access. Since StackOverflow is such a great resource, I want to be able to take it with me, so I'm building a small desktop application to load/search/display the most recent data d...