<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>Marc Schluper</title>
        <link>http://geekswithblogs.net/SilverMarc/Default.aspx</link>
        <description> Anything Silverlight</description>
        <language>en-US</language>
        <copyright>Marc Schluper</copyright>
        <managingEditor>mschluper@hotmail.com</managingEditor>
        <generator>Subtext Version 0.0.0.0</generator>
        <image>
            <title>Marc Schluper</title>
            <url>http://geekswithblogs.net/images/RSS2Image.gif</url>
            <link>http://geekswithblogs.net/SilverMarc/Default.aspx</link>
            <width>77</width>
            <height>60</height>
        </image>
        <item>
            <title>Invoke operation '...' failed. Error in deserializing body of request message for operation '...'. OperationFormatter encountered an invalid Message body.</title>
            <link>http://geekswithblogs.net/SilverMarc/archive/2012/12/17/invoke-operation-.-failed.-error-in-deserializing-body-of-request.aspx</link>
            <description>&lt;p&gt;Originally posted on: &lt;a href='http://geekswithblogs.net/SilverMarc/archive/2012/12/17/invoke-operation-.-failed.-error-in-deserializing-body-of-request.aspx'&gt;http://geekswithblogs.net/SilverMarc/archive/2012/12/17/invoke-operation-.-failed.-error-in-deserializing-body-of-request.aspx&lt;/a&gt;&lt;/p&gt;Sometimes even long error messages don't tell you much. This one is over 300 characters long and still does not clearly indicate what is wrong:&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;Invoke operation '...' failed. Error in deserializing body of request message for operation '...'. OperationFormatter encountered an invalid Message body. Expected to find node type 'Element' with name '...' and namespace '...'. Found node type 'None' with name '' and namespace ''&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Sure, considering the line of code where it was thrown it told me that WCF (RIA Services) failed to return an object in a call. I have hundreds of calls that work fine. Why did this one fail? &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I could not find it. So I decided to work around it and serialize the object myself:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;font face="Courier New" size="2"&gt;    string result;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="Courier New" size="2"&gt;    var sb = new StringBuilder();&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="Courier New" size="2"&gt;    using (TextWriter tw = new StringWriter(sb))&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="Courier New" size="2"&gt;    {&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="Courier New" size="2"&gt;       XmlSerializer ser = new XmlSerializer(typeof(...));&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="Courier New" size="2"&gt;       ser.Serialize(tw, theObject);&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="Courier New" size="2"&gt;       result = sb.ToString();&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="Courier New" size="2"&gt;    }&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="Courier New" size="2"&gt;    return result;&lt;/font&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;When this code ran it revealed the error (in the InnerException): I had a field of type &lt;font face="Courier New" size="2"&gt;enum&lt;/font&gt;, and the value I assigned to it (coming from a database) was not valid - I had forgotten to update the &lt;font face="Courier New" size="2"&gt;enum&lt;/font&gt; definition.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Anyhow, the bottom line is that if you get the long error message mentioned above you might want to serialize the object yourself, so that a more precise error message is revealed.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt; &lt;img src="http://geekswithblogs.net/SilverMarc/aggbug/151582.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Marc Schluper</dc:creator>
            <guid>http://geekswithblogs.net/SilverMarc/archive/2012/12/17/invoke-operation-.-failed.-error-in-deserializing-body-of-request.aspx</guid>
            <pubDate>Tue, 18 Dec 2012 05:25:17 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/SilverMarc/comments/151582.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/SilverMarc/archive/2012/12/17/invoke-operation-.-failed.-error-in-deserializing-body-of-request.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/SilverMarc/comments/commentRss/151582.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Silverlight 5 ComboBox more rigid: Cannot call StartAt when content generation is in progress</title>
            <link>http://geekswithblogs.net/SilverMarc/archive/2011/10/10/silverlight-5-combobox-more-rigid.aspx</link>
            <description>&lt;p&gt;Originally posted on: &lt;a href='http://geekswithblogs.net/SilverMarc/archive/2011/10/10/silverlight-5-combobox-more-rigid.aspx'&gt;http://geekswithblogs.net/SilverMarc/archive/2011/10/10/silverlight-5-combobox-more-rigid.aspx&lt;/a&gt;&lt;/p&gt;It looks like Silverlight 5's ComboBox is more restrictive. In Silverlight 4 I could change the ItemsSource of a ComboBox that had a SelectedItem != null, while in Silverlight 5 I have to set SelectedItem to null before I assign a new ItemsSource. Why even mention this? Isn't this obvious?

Well, the Silverlight 4 ComboBox simply ignored the SelectedItem and did not complain about the new ItemsSource, so moving to Silverlight 5 may cause some (unexpected) pain. But the real reason for this post is the exception that is thrown: InvalidOperationException ("Cannot call StartAt when content generation is in progress.") 

Saying this (Cannot call StartAt when content generation is in progress) is not very helpful, is it? Moreover, this exception is not thrown at a place that refers to the cause of the problem (the assignment to a ComboBox's ItemsSource):
System.Windows.Controls.ItemContainerGenerator.System.Windows.Controls.Primitives.IItemContainerGenerator.StartAt
At that point the whole stack trace is grayed out. (It does hint toward the ComboBox' SetContentPresenter, though.)

So if you got confused, searched for the error message, and ended up here, you may want to check your ComboBoxes' ItemsSource assignments.
 &lt;img src="http://geekswithblogs.net/SilverMarc/aggbug/147241.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Marc Schluper</dc:creator>
            <guid>http://geekswithblogs.net/SilverMarc/archive/2011/10/10/silverlight-5-combobox-more-rigid.aspx</guid>
            <pubDate>Mon, 10 Oct 2011 15:34:23 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/SilverMarc/comments/147241.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/SilverMarc/archive/2011/10/10/silverlight-5-combobox-more-rigid.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/SilverMarc/comments/commentRss/147241.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Event notifications for Reporting Systems</title>
            <link>http://geekswithblogs.net/SilverMarc/archive/2010/12/30/event-notifications-for-reporting-systems.aspx</link>
            <description>&lt;p&gt;Originally posted on: &lt;a href='http://geekswithblogs.net/SilverMarc/archive/2010/12/30/event-notifications-for-reporting-systems.aspx'&gt;http://geekswithblogs.net/SilverMarc/archive/2010/12/30/event-notifications-for-reporting-systems.aspx&lt;/a&gt;&lt;/p&gt;&lt;div style="margin: 0in 0in 10pt"&gt;The last couple of months I have been working on an application that allows people to browse a data mart. Nice, but nothing new. In this context I have an idea that I want to publish before anyone else patents it: event notifications.&lt;/div&gt;
&lt;div style="margin: 0in 0in 10pt"&gt;You see, reporting systems are not used as much as we’d like. Typically, users don’t know where to look for reports that might interest them. At best, there are some standard reports that people generate every so often, i.e. based on a &lt;i&gt;time trigger&lt;/i&gt;. Or some reporting systems can be configured to send monthly reports around, for convenience. But apart from that, the reporting system is just sitting there, waiting for the rare curious user who makes the effort to dig a bit for treasures to be found.&lt;/div&gt;
&lt;div style="margin: 0in 0in 10pt"&gt;Wouldn’t it be great if there were &lt;i&gt;data triggers&lt;/i&gt;? Imagine we could configure the reporting system to let us know when something interesting has happened. It would send us a message containing a link that would take us to the relevant section of the reporting system, showing a report with all the data pertaining to that event, preparing us for proper actions.&lt;/div&gt;
&lt;div style="margin: 0in 0in 10pt"&gt;Here in the North West this would really be great. You see, it rains here most of the time from October to June, so why even check the weather forecast? But sometimes, &lt;i&gt;sometimes&lt;/i&gt; it snows. And &lt;i&gt;sometimes&lt;/i&gt; the sun shines. So rather than me going to the weather site and seeing over and over again that it will be raining, making me think “why bother?” I’d like to configure the weather site so that it lets me know when the rain stops.&lt;/div&gt;
&lt;div style="margin: 0in 0in 10pt"&gt;Now, hopefully nobody has patented this idea already. Let me know.&lt;/div&gt; &lt;img src="http://geekswithblogs.net/SilverMarc/aggbug/143284.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Marc Schluper</dc:creator>
            <guid>http://geekswithblogs.net/SilverMarc/archive/2010/12/30/event-notifications-for-reporting-systems.aspx</guid>
            <pubDate>Thu, 30 Dec 2010 17:37:00 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/SilverMarc/comments/143284.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/SilverMarc/archive/2010/12/30/event-notifications-for-reporting-systems.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/SilverMarc/comments/commentRss/143284.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Like camping on the moon</title>
            <link>http://geekswithblogs.net/SilverMarc/archive/2010/04/02/like-camping-on-the-moon.aspx</link>
            <description>&lt;p&gt;Originally posted on: &lt;a href='http://geekswithblogs.net/SilverMarc/archive/2010/04/02/like-camping-on-the-moon.aspx'&gt;http://geekswithblogs.net/SilverMarc/archive/2010/04/02/like-camping-on-the-moon.aspx&lt;/a&gt;&lt;/p&gt;&lt;p&gt;No Silverlight today. I made a mistake. I created an application to upload a file and store it encrypted on a server. But I forgot to check on what machine it needed to be deployed. Yesterday I heard it was on an old ASP.NET 1.1 machine. Oops. Oh well, how hard can it be to change this simple application?&lt;/p&gt;
&lt;p&gt;Answer: much harder than I thought. Today I took out:&lt;/p&gt;
&lt;p&gt;Encryption using X509 Certificates&lt;br /&gt;
Master Pages&lt;br /&gt;
Compression&lt;br /&gt;
Using statements&lt;br /&gt;
Generic lists&lt;br /&gt;
Upload control&lt;br /&gt;
ASP.NET Membership&lt;/p&gt;
&lt;p&gt;All via a key hole to access a virtual machine. It has its charm, though, doing primitive things.&lt;br /&gt;
Like camping on the moon.&lt;/p&gt; &lt;img src="http://geekswithblogs.net/SilverMarc/aggbug/139058.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Marc Schluper</dc:creator>
            <guid>http://geekswithblogs.net/SilverMarc/archive/2010/04/02/like-camping-on-the-moon.aspx</guid>
            <pubDate>Fri, 02 Apr 2010 18:01:49 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/SilverMarc/comments/139058.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/SilverMarc/archive/2010/04/02/like-camping-on-the-moon.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/SilverMarc/comments/commentRss/139058.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Changing the action of a hyperlink in a Silverlight RichTextBox</title>
            <link>http://geekswithblogs.net/SilverMarc/archive/2010/03/14/changing-the-action-of-a-hyperlink-in-a-silverlight-richtextarea.aspx</link>
            <description>&lt;p&gt;Originally posted on: &lt;a href='http://geekswithblogs.net/SilverMarc/archive/2010/03/14/changing-the-action-of-a-hyperlink-in-a-silverlight-richtextarea.aspx'&gt;http://geekswithblogs.net/SilverMarc/archive/2010/03/14/changing-the-action-of-a-hyperlink-in-a-silverlight-richtextarea.aspx&lt;/a&gt;&lt;/p&gt;&lt;p&gt;The title of this post could also have been "Move over Hyperlink, here comes Actionlink" or "Creating interactive text in Silverlight." But alas, there can be only one.&lt;/p&gt;
&lt;p&gt;Hyperlinks are very useful. However, they are also limited because their action is &lt;em&gt;fixed&lt;/em&gt;: browse to a URL. This may have been adequate at the start of the Internet, but nowadays, in web applications, the one thing we do &lt;em&gt;not&lt;/em&gt; want to happen is a complete change of context. In applications we typically like a hyperlink selection to initiate an action that updates a part of the screen. For instance, if my application has a map displayed with some text next to it, the map would react to a selection of a hyperlink in the text, e.g. by zooming in on a location and displaying additional locational information in a popup. In this way, the text becomes &lt;em&gt;interactive text&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;It is quite common that one company creates and maintains websites for many client companies. To keep maintenance cost low, it is important that the content of these websites can be updated by the client companies themselves, without the need to involve a software engineer. To accommodate this scenario, we want the author of the interactive text to configure all hyperlinks (without writing any code).&lt;/p&gt;
&lt;p&gt;In a Silverlight RichTextBox, the default action of a Hyperlink is the same as a traditional hyperlink, but it can be changed: if the &lt;strong&gt;Command&lt;/strong&gt; property has a value then upon a click event this command is called with the value of the &lt;strong&gt;CommandParameter&lt;/strong&gt; as parameter. How can we let the author of the text specify a command for each hyperlink in the text, and how can we let an application react properly to a hyperlink selection event?&lt;/p&gt;
&lt;p&gt;We are talking about &lt;em&gt;any&lt;/em&gt; command here. Obviously, the application would recognize only a specific set of commands, with well defined parameters, but the approach we take here is generic in the sense that it pertains to the RichTextArea and &lt;em&gt;any&lt;/em&gt; command.&lt;/p&gt;
&lt;p&gt;So what do we require? We wish that:&lt;/p&gt;
&lt;ol&gt;
    &lt;li&gt;As a text author, I can configure the action of a hyperlink in a (rich) text without writing code;&lt;/li&gt;
    &lt;li&gt;As a text author, I can persist the action of a hyperlink with the text;&lt;/li&gt;
    &lt;li&gt;As a reader of persisted text, I can click a hyperlink and the configured action will happen;&lt;/li&gt;
    &lt;li&gt;As an application developer, I can configure a control to use my application specific commands.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;In &lt;a target="_new" href="http://channel9.msdn.com/learn/courses/Silverlight4/NewFeatures/RichTextBox/"&gt;an excellent introduction to the RichTextBox&lt;/a&gt;, John Papa shows (among other things) how to persist a text created using this control. To meet our requirements, we can create a subclass of RichTextBox that uses John's code and allows plugging in two command specific components: one to prompt for a command definition, and one to execute the command. Since both of these plugins are application specific, our RichTextBox subclass should not assume anything about them except their interface.&lt;/p&gt;
&lt;pre&gt;
  public interface IDefineCommand  
  {
    void Prompt(string content,                     // the link content
                Action&amp;lt;string, object&amp;gt; callback);   // the method called to convey the link definition
  }
  
  public interface IPerformCommand : ICommand {}
&lt;/pre&gt;
&lt;p&gt;The IDefineCommand plugin receives the content of the link (the text visible to the reader) and displays some kind of control that allows the author to define the link. When that's done, this (possibly changed) content string is conveyed back to the RichTextArea, together with an object that defines the command to execute when the link is clicked by the reader of the published text. &lt;br /&gt;
The IPerformCommand plugin simply implements System.Windows.Input.ICommand.&lt;/p&gt;
&lt;p&gt;Let's use &lt;a target="_new" href="http://www.codeplex.com/MEF"&gt;&lt;strong&gt;MEF&lt;/strong&gt;&lt;/a&gt; to load the proper plugins. In the example solution there is a project that contains rudimentary implementations of these. The IDefineCommand plugin simply prompts for a command string (cf. a command line or query string), and the IPerformCommand plugin displays a MessageBox showing this command string. An actual application using this extended RichTextBox would have its own set of commands, each having their own parameters, and hence would provide more user friendly application specific plugins. Nonetheless, in any case a command can be persisted as a string and hence the two interfaces defined above suffice.&lt;/p&gt;
&lt;p&gt;For a Visual Studio 2010 solution, see &lt;a target="_new" href="http://www.codeproject.com/KB/silverlight/InteractiveText.aspx"&gt;my article on The Code Project&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Hopefully someone at Microsoft can make sure the CommandParameter property is supported in TextSelection.Xaml.&lt;/p&gt; &lt;img src="http://geekswithblogs.net/SilverMarc/aggbug/138521.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Marc Schluper</dc:creator>
            <guid>http://geekswithblogs.net/SilverMarc/archive/2010/03/14/changing-the-action-of-a-hyperlink-in-a-silverlight-richtextarea.aspx</guid>
            <pubDate>Mon, 15 Mar 2010 04:01:27 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/SilverMarc/comments/138521.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/SilverMarc/archive/2010/03/14/changing-the-action-of-a-hyperlink-in-a-silverlight-richtextarea.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/SilverMarc/comments/commentRss/138521.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Get rid of Web Application pages</title>
            <link>http://geekswithblogs.net/SilverMarc/archive/2010/02/03/get-rid-of-web-application-pages.aspx</link>
            <description>&lt;p&gt;Originally posted on: &lt;a href='http://geekswithblogs.net/SilverMarc/archive/2010/02/03/get-rid-of-web-application-pages.aspx'&gt;http://geekswithblogs.net/SilverMarc/archive/2010/02/03/get-rid-of-web-application-pages.aspx&lt;/a&gt;&lt;/p&gt;&lt;p&gt;
Sometimes it is really, really difficult to get rid of bad habits. One of these habits in our profession is the use of pages in web applications. 
The &lt;a href="http://en.wikipedia.org/wiki/World_Wide_Web&amp;quot;" target="_new"&gt;World Wide Web&lt;/a&gt; started as a system of interlinked hypertext documents contained on the Internet. Why is it that nowadays, two decades later, we &lt;em&gt;still&lt;/em&gt; build web applications using the document concept, putting content on &lt;strong&gt;pages&lt;/strong&gt;?
&lt;/p&gt;
&lt;p&gt;
The worst use of pages is when we force the user to switch between pages while doing a single task. Every page change means a short wait: the page needs to be loaded and rendered. Data needs to be retrieved. It also means the server gets hit, often needlessly (as the same data has been retrieved before). Moreover, every time a user needs to open a different page, she gets a context switch and needs to reorient herself. Eyes need to be focused. Things need to be recognized. Sometimes we even need to scroll the page! If this happens once or twice it's no big deal. But if it happens all day it becomes a headache.
&lt;/p&gt;
&lt;p&gt;
Instead, an application should allow a user to put all tools needed to perform a task on one desktop. Of course we then get into the issue of screen real estate - is there enough space to display all tools (DataGrids, Forms, etc) on a single screen? This problem has been solved decades ago: we have used windows ever since. So what is holding us back from using windows instead of pages in web applications?
&lt;/p&gt;
&lt;p&gt;
Sometimes it is really, really difficult to get rid of bad habits. Now that we have Silverlight we are free and could dump pages right here and now. But what is the first Silverlight Business Application template that appears in Visual Studio? One that is based on pages. Desktop applications &lt;em&gt;never&lt;/em&gt; have pages. Why would they?
&lt;/p&gt;
&lt;p&gt;
So I call upon all web application developers of the world: "Stop using pages! Put related controls in a &lt;strong&gt;window&lt;/strong&gt;. Have a taskbar that contains for each window an icon that when clicked causes the corresponding window to appear on top. Allow windows to be resized, dragged, and closed."
&lt;/p&gt;
&lt;p&gt;
Your customers will love it. Finally, &lt;em&gt;finally&lt;/em&gt; they are free from pages!
&lt;/p&gt; &lt;img src="http://geekswithblogs.net/SilverMarc/aggbug/137780.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>SilverMarc</dc:creator>
            <guid>http://geekswithblogs.net/SilverMarc/archive/2010/02/03/get-rid-of-web-application-pages.aspx</guid>
            <pubDate>Wed, 03 Feb 2010 17:41:02 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/SilverMarc/comments/137780.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/SilverMarc/archive/2010/02/03/get-rid-of-web-application-pages.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/SilverMarc/comments/commentRss/137780.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Changing the FontSize in a RichTextArea</title>
            <link>http://geekswithblogs.net/SilverMarc/archive/2010/02/01/changing-the-fontsize-in-a-richtextarea.aspx</link>
            <description>&lt;p&gt;Originally posted on: &lt;a href='http://geekswithblogs.net/SilverMarc/archive/2010/02/01/changing-the-fontsize-in-a-richtextarea.aspx'&gt;http://geekswithblogs.net/SilverMarc/archive/2010/02/01/changing-the-fontsize-in-a-richtextarea.aspx&lt;/a&gt;&lt;/p&gt;&lt;p&gt;It's nice if a user can set the font size of all text displayed in an application, especially if this user is me and I am giving a demo - the font size that works for me (12.0) at my desk is not necessarily ideal during a presentation. So I have a FontSize property in my ViewModel that all controls observe. For RichTextArea controls that simply display text authored previously, changing the FontSize has no effect, since the FontSize of the text displayed is a property of the text itself, not of the control.&lt;/p&gt;
&lt;p&gt;The &lt;a href="http://channel9.msdn.com/learn/courses/Silverlight4/RichTextEditor/RichTextEditor/" target="_new"&gt;excellent introduction to the RichTextArea by John Papa&lt;/a&gt; taught me a bit on the data structure this control uses to store the text. And so I could let my RichTextArea control react to any change in the ViewModel property by executing:&lt;/p&gt;
&lt;pre&gt;
        public void IncreaseFontSize(double factor)
        {
            var res = from block in StoryTextArea.Blocks
                      from inline in (block as Paragraph).Inlines
                      select inline;
            Array.ForEach(res.ToArray(), (i) =&amp;gt;         // i stands for inline
            {
                i.FontSize = factor * i.FontSize;
                Hyperlink hl = i as Hyperlink;
                if (hl != null)
                {
                    Array.ForEach(hl.Inlines.ToArray(), iHL =&amp;gt; iHL.FontSize = factor * iHL.FontSize);
                }
            });
        }
&lt;/pre&gt;
&lt;p&gt;It's fast enough (for the typical texts I have) to adjust the font fluently. Cool!&lt;/p&gt; &lt;img src="http://geekswithblogs.net/SilverMarc/aggbug/137741.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>SilverMarc</dc:creator>
            <guid>http://geekswithblogs.net/SilverMarc/archive/2010/02/01/changing-the-fontsize-in-a-richtextarea.aspx</guid>
            <pubDate>Mon, 01 Feb 2010 17:21:30 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/SilverMarc/comments/137741.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/SilverMarc/archive/2010/02/01/changing-the-fontsize-in-a-richtextarea.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/SilverMarc/comments/commentRss/137741.aspx</wfw:commentRss>
        </item>
    </channel>
</rss>