October 29th, 2013, 08:10 AM
Drawing border around marked text in Forms.RichTextbox or Control.RichTextbox
I have a small but annoying problem concerning RichTextBox. I want to draw a two-color border line around a marked text area (selection) with XAML. The typical border funktion is drawing a border around marked lines and not marked area and it's just one color. It looks like underlined in most feeds - very ugly. I need two colors, because of changing color background of marked text and box.
So I tried artificially measure the distance to in pixels to left box border, width of chars, string etc, but it doesn't work in warping text, because I have no clue how to measure distance, if you resize box. Esp. area is not rectangle (paragraph, end line etc).
Beside, I got feeling that's blooty overkill.
Do you have some hints or ideas about properties, methods or events in .Net 4.0 framework for me dealing with the problem?
Yeah! Your code is so sexy!
Click Here to Expand Forum to Full Width
This is a Codeguru.com survey!