<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Customize RichTextBox to allow only plain text input (with custom ContextMenu)</title><link>http://blogs.msdn.com/prajakta/archive/2006/10/12/customize-richtextbox-to-allow-only-plain-text-input.aspx</link><description>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</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: Customize RichTextBox to allow only plain text input (with custom ContextMenu)</title><link>http://blogs.msdn.com/prajakta/archive/2006/10/12/customize-richtextbox-to-allow-only-plain-text-input.aspx#980666</link><pubDate>Sun, 05 Nov 2006 23:19:38 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:980666</guid><dc:creator>hardcode</dc:creator><description>&lt;p&gt;Hi!&lt;/p&gt;
&lt;p&gt;I'm trying to disable copy on a RichTextBox. Even if I have set args.CanExecute = false the menu item is still enabled on the context menu.&lt;/p&gt;
&lt;p&gt;Please help!&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
</description></item><item><title>re: Customize RichTextBox to allow only plain text input (with custom ContextMenu)</title><link>http://blogs.msdn.com/prajakta/archive/2006/10/12/customize-richtextbox-to-allow-only-plain-text-input.aspx#1055337</link><pubDate>Sat, 11 Nov 2006 00:10:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1055337</guid><dc:creator>Prajakta Joshi</dc:creator><description>&lt;p&gt;Apologies for the late response to your question. I suspect that the behavior you are seeing is due to the bubbling nature of RoutedUICommands. When your custom RichTextBox sets CanExecute to false, the bubbling mechanism checks CanExecute on the base RichTextBox class, which returns true.&lt;/p&gt;
&lt;p&gt;If you want to disable copy, set CanExecute to true and do nothing in the event handler. That should do the trick. Hope this helps!&lt;/p&gt;
</description></item><item><title>re: Customize RichTextBox to allow only plain text input (with custom ContextMenu)</title><link>http://blogs.msdn.com/prajakta/archive/2006/10/12/customize-richtextbox-to-allow-only-plain-text-input.aspx#2411046</link><pubDate>Fri, 04 May 2007 18:33:28 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2411046</guid><dc:creator>BS</dc:creator><description>&lt;p&gt;Great post! This is exactly what I needed in my rtb--you saved alot of legwork for me. Thank you&lt;/p&gt;</description></item></channel></rss>