Browse by Tags

Tagged Content List
  • Blog Post: WPF Blog Writer by Lester

    This past winter, I had coded a custom control which has a RichTextBox with toolbar for various formatting commands. I had hoped to publish it as a a standalone control sample which people could reuse, but it needed some styling to make the control look prettier. Lester has done a great job with that...
  • Blog Post: Printing Contents of WPF RichTextBox

    I was recently playing with code to print contents of WPF RichTextBox control. The SDK has a code sample on this at http://msdn2.microsoft.com/en-us/library/aa970917.aspx // Print RichTextBox content private void PrintCommand() { PrintDialog pd = new PrintDialog (); if ((pd.ShowDialog...
  • Blog Post: Auto-detecting Hyperlinks in RichTextBox - Part II

    In my previous post, we looked at code that auto-formats hyperlink strings while typing. The remaining part was to scan words when content is pasted in RichTextBox to auto-format any hyperlink strings. The approach to do this is quite straight forward as you can imagine. Listen to DataObject. Pasting...
  • Blog Post: Replying to Messages

    I received a few questions from my blog readers in email. I will try my best to answer them in this post. Question 1 : Hi there! I saw that you were posting about the use of RichTextBox control and I thought you might be able to help me on my problem: how can I get the current line number and the...
  • Blog Post: Navigate Words in RichTextBox

    A commonly asked question on the WPF forum is - how can I navigate RichTextBox 's content word by word (see http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=778441&SiteID=1 ). In today's post, we will see how this can be done using the TextPointer API. What we need is a helper function which...
  • Blog Post: Auto-detecting Hyperlinks in RichTextBox - Part I

    In this post, we will see a custom RichTextBox implementation that auto-detects Hyperlink s while typing. In a later post, I will demonstrate how auto-detection can be done on paste command. Both these parts together enable complete auto-detect support for hyperlinks in a RichTextBox. For simplicity...
  • Blog Post: Customize RichTextBox to allow only plain text input (with custom ContextMenu)

    In this post, we will look at a custom RichTextBox implementation. In V1, TextBox selection highlight is not extensible and TextBox schema is restricted to plain text only. Often customers want a “ rich ” TextBox, where they can apply formatting properties (such as bold, underline) to Run s of text...
  • Blog Post: FlowDocument Content Model

    A while ago, I made up a UML diagram to illustrate WPF FlowDocument content model. This diagram is useful to understand the inheritance hierarchy of TextElement implementations and their TextElementCollection members. Check out the full diagram here . The one aspect of content schema this diagram...
Page 1 of 1 (8 items)