<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Goal Book. Blog</title>
	<atom:link href="http://goalbook.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://goalbook.wordpress.com</link>
	<description>Design decisions and technical challenges encountered during development of the GoalBook application</description>
	<lastBuildDate>Thu, 03 Nov 2011 19:36:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='goalbook.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Goal Book. Blog</title>
		<link>http://goalbook.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://goalbook.wordpress.com/osd.xml" title="Goal Book. Blog" />
	<atom:link rel='hub' href='http://goalbook.wordpress.com/?pushpress=hub'/>
		<item>
		<title>WPF CheckedList Control</title>
		<link>http://goalbook.wordpress.com/2009/09/05/wpf-checkedlist-control/</link>
		<comments>http://goalbook.wordpress.com/2009/09/05/wpf-checkedlist-control/#comments</comments>
		<pubDate>Fri, 04 Sep 2009 20:45:28 +0000</pubDate>
		<dc:creator>Mark Brownsword</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://goalbook.wordpress.com/2009/09/05/wpf-checkedlist-control/</guid>
		<description><![CDATA[The latest feature added to GoalBook is filtering of data using a custom CheckedList control. WPF doesn’t provide a CheckedList control though it is possible to create a composite control using the standard ListBox and CheckBox controls. The two key challenges I found were in binding the CheckBox.IsChecked property to the ListBoxItem.IsSelected property and hiding [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=goalbook.wordpress.com&amp;blog=7325786&amp;post=97&amp;subd=goalbook&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The latest feature added to GoalBook is filtering of data using a custom CheckedList control. WPF doesn’t provide a CheckedList control though it is possible to create a composite control using the standard ListBox and CheckBox controls. The two key challenges I found were in binding the CheckBox.IsChecked property to the ListBoxItem.IsSelected property and hiding the default blue ListBoxItem Background colour. </p>
<p>The appearance of the list is as expected; </p>
<p><a href="http://goalbook.files.wordpress.com/2009/09/checkedlist.png"><img style="border-bottom:0;border-left:0;display:inline;border-top:0;border-right:0;" title="CheckedList" border="0" alt="CheckedList" src="http://goalbook.files.wordpress.com/2009/09/checkedlist_thumb.png?w=190&#038;h=224" width="190" height="224" /></a> </p>
<p>The only code behind required is in initialising the selected items. Note the data required for populating the CheckedList is a generic Dictionary&lt;int, string&gt; which is set in the DataContext. A second Dictionary&lt;int, string&gt; allows for getting and setting the checked items.</p>
<div style="padding:5px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:8e3a9dfe-23b4-424c-824e-c8cfdbd2565d" class="wlWriterEditableSmartContent">
<div style="border:#000080 1px solid;font-family:'Courier New', Courier, Monospace;font-size:10pt;">
<div style="background-color:#ffffff;max-height:300px;overflow:scroll;white-space:nowrap;padding:2px 5px;">
<p>  <span style="color:#0000ff;">foreach</span> (<span style="color:#0000ff;">object</span> item <span style="color:#0000ff;">in</span> filterListBox.Items)<br /> {<br />     <span style="color:#008000;">// Get the listBoxItem belonging to the item.</span><br />     <span style="color:#2b91af;">ListBoxItem</span> listBoxItem = (<span style="color:#2b91af;">ListBoxItem</span>)<span style="color:#0000ff;">this</span>.filterListBox.ItemContainerGenerator.ContainerFromItem(item);<br />     <span style="color:#2b91af;">KeyValuePair</span>&lt;<span style="color:#0000ff;">int</span>, <span style="color:#0000ff;">string</span>&gt; content = (<span style="color:#2b91af;">KeyValuePair</span>&lt;<span style="color:#0000ff;">int</span>, <span style="color:#0000ff;">string</span>&gt;)listBoxItem.Content;<br />     <br />     <span style="color:#0000ff;">if</span> (<span style="color:#0000ff;">this</span>.CheckedItems.ContainsKey(content.Key))<br />     {<br />         listBoxItem.IsSelected = <span style="color:#0000ff;">true</span>;<br />     }<br /> }  </p>
</div>
</div>
</div>
<p>The XAML is as follows. The ControlTemplate is responsible for setting the background of the selected items to transparent. The ListBox’s SelectionMode is Multiple. The text displayed for each checkbox (content property) is from the bound Dictionary’s Value property. The CheckBox’s IsChecked property binds to the ListBoxItem’s IsSelected property. Note the ListBoxItem is implicitly created when the ListBox binds to its data.</p>
<div style="padding:5px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:741d08af-da66-42ac-ae46-9a966d660c55" class="wlWriterEditableSmartContent">
<div style="border:#000080 1px solid;font-family:'Courier New', Courier, Monospace;font-size:10pt;">
<div style="background-color:#ffffff;max-height:300px;overflow:scroll;white-space:nowrap;padding:2px 5px;">
<p>  <span style="color:#0000ff;">&lt;</span><span style="color:#a31515;">ListBox</span><span style="color:#ff0000;"> Name</span><span style="color:#0000ff;">=&#8221;filterListBox&#8221;</span> <br /> <span style="color:#ff0000;">    Grid.Row</span><span style="color:#0000ff;">=&#8221;0&#8243;<br /> </span><span style="color:#ff0000;">    SelectionMode</span><span style="color:#0000ff;">=&#8221;Multiple&#8221;<br /> </span><span style="color:#ff0000;">    BorderThickness</span><span style="color:#0000ff;">=&#8221;0&#8243;</span> <br /> <span style="color:#ff0000;">    Margin</span><span style="color:#0000ff;">=&#8221;5,5,5,5&#8243;</span>                <br /> <span style="color:#ff0000;">    ItemsSource</span><span style="color:#0000ff;">=&#8221;{</span><span style="color:#a31515;">Binding</span><span style="color:#ff0000;"> Mode</span><span style="color:#0000ff;">=OneWay}&#8221; &gt;<br /> </span><span style="color:#a31515;">    </span><span style="color:#0000ff;">&lt;</span><span style="color:#a31515;">ListBox.ItemContainerStyle</span><span style="color:#0000ff;">&gt;<br /> </span><span style="color:#a31515;">        </span><span style="color:#0000ff;">&lt;</span><span style="color:#a31515;">Style</span><span style="color:#ff0000;"> TargetType</span><span style="color:#0000ff;">=&#8221;ListBoxItem&#8221;&gt;<br /> </span><span style="color:#a31515;">            </span><span style="color:#0000ff;">&lt;</span><span style="color:#a31515;">Setter</span><span style="color:#ff0000;"> Property</span><span style="color:#0000ff;">=&#8221;HorizontalContentAlignment&#8221;</span><span style="color:#ff0000;"> Value</span><span style="color:#0000ff;">=&#8221;Stretch&#8221;/&gt;<br /> </span><span style="color:#a31515;">            </span><span style="color:#0000ff;">&lt;</span><span style="color:#a31515;">Setter</span><span style="color:#ff0000;"> Property</span><span style="color:#0000ff;">=&#8221;HorizontalAlignment&#8221;</span><span style="color:#ff0000;"> Value</span><span style="color:#0000ff;">=&#8221;Stretch&#8221;/&gt;<br /> </span><span style="color:#a31515;">            </span><span style="color:#0000ff;">&lt;</span><span style="color:#a31515;">Setter</span><span style="color:#ff0000;"> Property</span><span style="color:#0000ff;">=&#8221;Template&#8221;&gt;<br /> </span><span style="color:#a31515;">                </span><span style="color:#0000ff;">&lt;</span><span style="color:#a31515;">Setter.Value</span><span style="color:#0000ff;">&gt;<br /> </span><span style="color:#a31515;">                    </span><span style="color:#0000ff;">&lt;</span><span style="color:#a31515;">ControlTemplate</span><span style="color:#ff0000;"> TargetType</span><span style="color:#0000ff;">=&#8221;ListBoxItem&#8221;&gt;<br /> </span><span style="color:#a31515;">                        </span><span style="color:#0000ff;">&lt;</span><span style="color:#a31515;">Border</span><span style="color:#ff0000;"> Name</span><span style="color:#0000ff;">=&#8221;Border&#8221;</span><span style="color:#ff0000;"> Padding</span><span style="color:#0000ff;">=&#8221;0&#8243;</span><span style="color:#ff0000;"> SnapsToDevicePixels</span><span style="color:#0000ff;">=&#8221;true&#8221;&gt;<br /> </span><span style="color:#a31515;">                            </span><span style="color:#0000ff;">&lt;</span><span style="color:#a31515;">ContentPresenter</span><span style="color:#0000ff;"> /&gt;<br /> </span><span style="color:#a31515;">                        </span><span style="color:#0000ff;">&lt;/</span><span style="color:#a31515;">Border</span><span style="color:#0000ff;">&gt;<br /> </span><span style="color:#a31515;">                        </span><span style="color:#0000ff;">&lt;</span><span style="color:#a31515;">ControlTemplate.Triggers</span><span style="color:#0000ff;">&gt;<br /> </span><span style="color:#a31515;">                            </span><span style="color:#0000ff;">&lt;</span><span style="color:#a31515;">Trigger</span><span style="color:#ff0000;"> Property</span><span style="color:#0000ff;">=&#8221;IsSelected&#8221;</span><span style="color:#ff0000;"> Value</span><span style="color:#0000ff;">=&#8221;true&#8221;&gt;<br /> </span><span style="color:#a31515;">                                </span><span style="color:#0000ff;">&lt;</span><span style="color:#a31515;">Setter</span><span style="color:#ff0000;"> TargetName</span><span style="color:#0000ff;">=&#8221;Border&#8221;</span><span style="color:#ff0000;"> Property</span><span style="color:#0000ff;">=&#8221;Background&#8221;</span><span style="color:#ff0000;"> Value</span><span style="color:#0000ff;">=&#8221;Transparent&#8221;/&gt;<br /> </span><span style="color:#a31515;">                            </span><span style="color:#0000ff;">&lt;/</span><span style="color:#a31515;">Trigger</span><span style="color:#0000ff;">&gt;<br /> </span><span style="color:#a31515;">                            </span><span style="color:#0000ff;">&lt;</span><span style="color:#a31515;">Trigger</span><span style="color:#ff0000;"> Property</span><span style="color:#0000ff;">=&#8221;IsSelected&#8221;</span><span style="color:#ff0000;"> Value</span><span style="color:#0000ff;">=&#8221;false&#8221;&gt;<br /> </span><span style="color:#a31515;">                                </span><span style="color:#0000ff;">&lt;</span><span style="color:#a31515;">Setter</span><span style="color:#ff0000;"> TargetName</span><span style="color:#0000ff;">=&#8221;Border&#8221;</span><span style="color:#ff0000;"> Property</span><span style="color:#0000ff;">=&#8221;Background&#8221;</span><span style="color:#ff0000;"> Value</span><span style="color:#0000ff;">=&#8221;Transparent&#8221;/&gt;<br /> </span><span style="color:#a31515;">                            </span><span style="color:#0000ff;">&lt;/</span><span style="color:#a31515;">Trigger</span><span style="color:#0000ff;">&gt;<br /> </span><span style="color:#a31515;">                        </span><span style="color:#0000ff;">&lt;/</span><span style="color:#a31515;">ControlTemplate.Triggers</span><span style="color:#0000ff;">&gt;<br /> </span><span style="color:#a31515;">                    </span><span style="color:#0000ff;">&lt;/</span><span style="color:#a31515;">ControlTemplate</span><span style="color:#0000ff;">&gt;<br /> </span><span style="color:#a31515;">                </span><span style="color:#0000ff;">&lt;/</span><span style="color:#a31515;">Setter.Value</span><span style="color:#0000ff;">&gt;<br /> </span><span style="color:#a31515;">            </span><span style="color:#0000ff;">&lt;/</span><span style="color:#a31515;">Setter</span><span style="color:#0000ff;">&gt;<br /> </span><span style="color:#a31515;">        </span><span style="color:#0000ff;">&lt;/</span><span style="color:#a31515;">Style</span><span style="color:#0000ff;">&gt;<br /> </span><span style="color:#a31515;">    </span><span style="color:#0000ff;">&lt;/</span><span style="color:#a31515;">ListBox.ItemContainerStyle</span><span style="color:#0000ff;">&gt;<br /> </span><span style="color:#a31515;">    </span><span style="color:#0000ff;">&lt;</span><span style="color:#a31515;">ListBox.ItemTemplate</span><span style="color:#0000ff;">&gt;<br /> </span><span style="color:#a31515;">        </span><span style="color:#0000ff;">&lt;</span><span style="color:#a31515;">DataTemplate</span><span style="color:#0000ff;">&gt;<br /> </span><span style="color:#a31515;">            </span><span style="color:#0000ff;">&lt;</span><span style="color:#a31515;">StackPanel</span><span style="color:#ff0000;"> Margin</span><span style="color:#0000ff;">=&#8221;0,5,0,5&#8243;</span><span style="color:#ff0000;"> Orientation</span><span style="color:#0000ff;">=&#8221;Horizontal&#8221; &gt;<br /> </span><span style="color:#a31515;">                </span><span style="color:#0000ff;">&lt;</span><span style="color:#a31515;">CheckBox</span><span style="color:#ff0000;"> Name</span><span style="color:#0000ff;">=&#8221;checkbox&#8221;</span> <br />                 <span style="color:#ff0000;">    Content</span><span style="color:#0000ff;">=&#8221;{</span><span style="color:#a31515;">Binding</span><span style="color:#ff0000;"> Path</span><span style="color:#0000ff;">=Value,</span><span style="color:#ff0000;"> Mode</span><span style="color:#0000ff;">=OneWay}&#8221;</span><br />                 <span style="color:#ff0000;">    VerticalContentAlignment</span><span style="color:#0000ff;">=&#8221;Center&#8221;</span> <br />                 <span style="color:#ff0000;">    Margin</span><span style="color:#0000ff;">=&#8221;0,0,5,0&#8243;</span> <br />                 <span style="color:#ff0000;">    Width</span><span style="color:#0000ff;">=&#8221;Auto&#8221;</span><br />                 <span style="color:#ff0000;">    IsChecked</span><span style="color:#0000ff;">=&#8221;{</span><span style="color:#a31515;">Binding</span><span style="color:#ff0000;"> RelativeSource</span><span style="color:#0000ff;">={</span><span style="color:#a31515;">RelativeSource</span><span style="color:#ff0000;"> FindAncestor</span><span style="color:#0000ff;">,</span> <br />                     <span style="color:#ff0000;">    AncestorType</span><span style="color:#0000ff;">={</span><span style="color:#a31515;">x</span><span style="color:#0000ff;">:</span><span style="color:#a31515;">Type</span><span style="color:#ff0000;"> ListBoxItem</span><span style="color:#0000ff;">}},</span><span style="color:#ff0000;"> Path</span><span style="color:#0000ff;">=IsSelected}&#8221;</span><br />                 <span style="color:#ff0000;">    IsTabStop</span><span style="color:#0000ff;">=&#8221;False&#8221;</span><br />                 <span style="color:#ff0000;">    Checked</span><span style="color:#0000ff;">=&#8221;FilterCheckbox_CheckChanged&#8221;</span> <br />                 <span style="color:#ff0000;">    Unchecked</span><span style="color:#0000ff;">=&#8221;FilterCheckbox_CheckChanged&#8221;/&gt;<br /> </span><span style="color:#a31515;">            </span><span style="color:#0000ff;">&lt;/</span><span style="color:#a31515;">StackPanel</span><span style="color:#0000ff;">&gt;<br /> </span><span style="color:#a31515;">        </span><span style="color:#0000ff;">&lt;/</span><span style="color:#a31515;">DataTemplate</span><span style="color:#0000ff;">&gt;<br /> </span><span style="color:#a31515;">    </span><span style="color:#0000ff;">&lt;/</span><span style="color:#a31515;">ListBox.ItemTemplate</span><span style="color:#0000ff;">&gt;<br /> &lt;/</span><span style="color:#a31515;">ListBox</span><span style="color:#0000ff;">&gt;</span>
</p>
</div>
</div>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/goalbook.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/goalbook.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/goalbook.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/goalbook.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/goalbook.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/goalbook.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/goalbook.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/goalbook.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/goalbook.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/goalbook.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/goalbook.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/goalbook.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/goalbook.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/goalbook.wordpress.com/97/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=goalbook.wordpress.com&amp;blog=7325786&amp;post=97&amp;subd=goalbook&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://goalbook.wordpress.com/2009/09/05/wpf-checkedlist-control/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/272f1f0e08a7233f936704f93725e664?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Mark Brownsword</media:title>
		</media:content>

		<media:content url="http://goalbook.files.wordpress.com/2009/09/checkedlist_thumb.png" medium="image">
			<media:title type="html">CheckedList</media:title>
		</media:content>
	</item>
		<item>
		<title>Adding search and filtering capability</title>
		<link>http://goalbook.wordpress.com/2009/08/24/adding-search-and-filtering-capability/</link>
		<comments>http://goalbook.wordpress.com/2009/08/24/adding-search-and-filtering-capability/#comments</comments>
		<pubDate>Sun, 23 Aug 2009 20:04:49 +0000</pubDate>
		<dc:creator>Mark Brownsword</dc:creator>
				<category><![CDATA[Design]]></category>

		<guid isPermaLink="false">http://goalbook.wordpress.com/2009/08/24/adding-search-and-filtering-capability/</guid>
		<description><![CDATA[I’ve looked at three options for adding search and filter capability to GoalBook. The first (and preferred) is to use LINQ queries with the CSLA LinqBindingList to enable filtering of the underlying collections. The LinqBindingList acts as a view over a business objects collection so binding UI elements to a LinqBindingList is really the same [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=goalbook.wordpress.com&amp;blog=7325786&amp;post=93&amp;subd=goalbook&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I’ve looked at three options for adding search and filter capability to GoalBook. </p>
<ol>
<li>The first (and preferred) is to use LINQ queries with the CSLA LinqBindingList to enable filtering of the underlying collections. The LinqBindingList acts as a view over a business objects collection so binding UI elements to a LinqBindingList is really the same as binding to the actual business objects collection. Though when I initialised the LinqBindingList using its constructor and set it as the datasource for XamDataGrid a databinding exception occurred (attempting to access an item outside the bounds of an array). </li>
<li>The second option was the CSLA FilteredBindingList which is described as obsolete (replaced by LinqBindingList). This also acts as a view over the underlying business objects collection with filtering based on properties/values. This worked well in the attempts I made to use it. </li>
<li>The third option was to use the XamDataGrid’s built in filtering. This is quite sophisticated but after some initial investigation I found that this functionality is not available for the Express edition. </li>
</ol>
<p>An important part of the GoalBook application is to explore and implement new technology, so I was determined to use option 1. After some binging (and googling) I found a post on the CSLA forum suggesting to look at the CSLA unit testing solution for examples of initialising the LinqBindingList. So I downloaded and looked into this and found that the initialisation was always being done by casting the result of a LINQ query. </p>
<div style="width:419px;display:block;float:none;margin-left:auto;margin-right:auto;padding:5px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:f2314d74-c4e5-485f-9650-36022fe8bd2c" class="wlWriterEditableSmartContent">
<div style="border:#000080 1px solid;font-family:'Courier New', Courier, Monospace;font-size:10pt;">
<div style="background-color:#ffffff;max-height:300px;overflow:scroll;white-space:nowrap;padding:2px 5px;">
<p>  Model.Goals = (<span style="color:#2b91af;">LinqBindingList</span>&lt;<span style="color:#2b91af;">Goal</span>&gt;)<span style="color:#0000ff;">from</span> item <span style="color:#0000ff;">in</span> _persistenceService.Goals <br />                                      <span style="color:#0000ff;">where</span> item.LevelID == 0 || <br />                                      item.LevelID == 1 || <br />                                      item.LevelID == 2 <br />                                      <span style="color:#0000ff;">select</span> item;  </p>
</div>
</div>
</div>
<p>GoalBook currently uses FilteredBindingList as its implementation for filtering and search. </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/goalbook.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/goalbook.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/goalbook.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/goalbook.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/goalbook.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/goalbook.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/goalbook.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/goalbook.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/goalbook.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/goalbook.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/goalbook.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/goalbook.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/goalbook.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/goalbook.wordpress.com/93/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=goalbook.wordpress.com&amp;blog=7325786&amp;post=93&amp;subd=goalbook&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://goalbook.wordpress.com/2009/08/24/adding-search-and-filtering-capability/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/272f1f0e08a7233f936704f93725e664?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Mark Brownsword</media:title>
		</media:content>
	</item>
		<item>
		<title>Display large icons</title>
		<link>http://goalbook.wordpress.com/2009/07/18/display-large-icons/</link>
		<comments>http://goalbook.wordpress.com/2009/07/18/display-large-icons/#comments</comments>
		<pubDate>Fri, 17 Jul 2009 22:45:54 +0000</pubDate>
		<dc:creator>Mark Brownsword</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://goalbook.wordpress.com/2009/07/18/display-large-icons/</guid>
		<description><![CDATA[Icon files can contain multiple images e.g. 16&#215;16, 24&#215;24, 32&#215;32, 48&#215;48. If you create an image control in Wpf and set its height &#38; width to one of the larger sizes, Wpf will stretch the first (16&#215;16) image to fill the space. This results in a blurred image. While it is possible to extract specific [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=goalbook.wordpress.com&amp;blog=7325786&amp;post=92&amp;subd=goalbook&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Icon files can contain multiple images e.g. 16&#215;16, 24&#215;24, 32&#215;32, 48&#215;48. If you create an image control in Wpf and set its height &amp; width to one of the larger sizes, Wpf will stretch the first (16&#215;16) image to fill the space. This results in a blurred image. While it is possible to extract specific icons dynamically in code, it is simpler for a static display like the GoalBook About dialog to use a tool like <a href="http://www.towofu.net/soft/e-aicon.php" target="_blank">Icon Sushi</a> to extract the required icon from the icon file. </p>
<p><a href="http://goalbook.files.wordpress.com/2009/07/image.png"><img style="border-bottom:0;border-left:0;display:inline;border-top:0;border-right:0;" title="image" border="0" alt="image" src="http://goalbook.files.wordpress.com/2009/07/image_thumb.png?w=240&#038;h=146" width="240" height="146" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/goalbook.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/goalbook.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/goalbook.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/goalbook.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/goalbook.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/goalbook.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/goalbook.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/goalbook.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/goalbook.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/goalbook.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/goalbook.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/goalbook.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/goalbook.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/goalbook.wordpress.com/92/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=goalbook.wordpress.com&amp;blog=7325786&amp;post=92&amp;subd=goalbook&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://goalbook.wordpress.com/2009/07/18/display-large-icons/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/272f1f0e08a7233f936704f93725e664?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Mark Brownsword</media:title>
		</media:content>

		<media:content url="http://goalbook.files.wordpress.com/2009/07/image_thumb.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>Set Wpf Style in C#</title>
		<link>http://goalbook.wordpress.com/2009/07/17/set-wpf-style-in-c/</link>
		<comments>http://goalbook.wordpress.com/2009/07/17/set-wpf-style-in-c/#comments</comments>
		<pubDate>Fri, 17 Jul 2009 12:07:35 +0000</pubDate>
		<dc:creator>Mark Brownsword</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://goalbook.wordpress.com/2009/07/17/set-wpf-style-in-c/</guid>
		<description><![CDATA[When a FlowDocument is edited in the Wpf RichTextBox the default margin given to paragraphs causes a gap to appear when the user presses enter. This is a typical behaviour, but one that I didn’t want for the GoalBook notes editor. To ensure only a single line break occurs between paragraphs you can override the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=goalbook.wordpress.com&amp;blog=7325786&amp;post=89&amp;subd=goalbook&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>When a FlowDocument is edited in the Wpf RichTextBox the default margin given to paragraphs causes a gap to appear when the user presses enter. This is a typical behaviour, but one that I didn’t want for the GoalBook notes editor. To ensure only a single line break occurs between paragraphs you can override the default behaviour in Xaml;</p>
<div style="padding:5px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:8aa9bf2d-370a-4066-af9b-d9d817c6f793" class="wlWriterEditableSmartContent">
<div style="border:#000080 1px solid;font-family:'Courier New', Courier, Monospace;font-size:10pt;">
<div style="background-color:#ffffff;max-height:300px;overflow:scroll;white-space:nowrap;padding:2px 5px;">
<p>  <span style="color:#0000ff;">&lt;</span><span style="color:#a31515;">FlowDocument</span><span style="color:#0000ff;">&gt;<br /> </span><span style="color:#a31515;">    </span><span style="color:#0000ff;">&lt;</span><span style="color:#a31515;">FlowDocument.Resources</span><span style="color:#0000ff;">&gt;<br /> </span><span style="color:#a31515;">        </span><span style="color:#0000ff;">&lt;</span><span style="color:#a31515;">Style</span><span style="color:#ff0000;"> TargetType</span><span style="color:#0000ff;">=&#8221;{</span><span style="color:#a31515;">x</span><span style="color:#0000ff;">:</span><span style="color:#a31515;">Type</span><span style="color:#ff0000;"> Paragraph</span><span style="color:#0000ff;">}&#8221;&gt;<br /> </span><span style="color:#a31515;">            </span><span style="color:#0000ff;">&lt;</span><span style="color:#a31515;">Setter</span><span style="color:#ff0000;"> Property</span><span style="color:#0000ff;">=&#8221;Margin&#8221;</span><span style="color:#ff0000;"> Value</span><span style="color:#0000ff;">=&#8221;0&#8243;/&gt;<br /> </span><span style="color:#a31515;">        </span><span style="color:#0000ff;">&lt;/</span><span style="color:#a31515;">Style</span><span style="color:#0000ff;">&gt;<br /> </span><span style="color:#a31515;">    </span><span style="color:#0000ff;">&lt;/</span><span style="color:#a31515;">FlowDocument.Resources</span><span style="color:#0000ff;">&gt;<br /> </span><span style="color:#a31515;">    </span><span style="color:#0000ff;">&lt;</span><span style="color:#a31515;">Paragraph</span><span style="color:#0000ff;">&gt;&lt;/</span><span style="color:#a31515;">Paragraph</span><span style="color:#0000ff;">&gt;<br /> &lt;/</span><span style="color:#a31515;">FlowDocument</span><span style="color:#0000ff;">&gt;</span>
</p>
</div>
</div>
</div>
<p>Or in C#;</p>
<div style="padding:5px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:451d4197-b538-4522-b602-da8a6b6048e8" class="wlWriterEditableSmartContent">
<div style="border:#000080 1px solid;font-family:'Courier New', Courier, Monospace;font-size:10pt;">
<div style="background-color:#ffffff;max-height:300px;overflow:scroll;white-space:nowrap;padding:2px 5px;">
<p>  <span style="color:#008000;">// Initialise FlowDocument.            <br /> </span><span style="color:#2b91af;">FlowDocument</span> flowDocument = <span style="color:#0000ff;">new</span> <span style="color:#2b91af;">FlowDocument</span>();</p>
<p> <span style="color:#008000;">// Add Margin Styling to FlowDocument. This ensures that when the <br /> // document is edited in RichTextBox, new paragraphs have no margin.<br /> </span><span style="color:#2b91af;">Style</span> style = <span style="color:#0000ff;">new</span> <span style="color:#2b91af;">Style</span>(<span style="color:#0000ff;">typeof</span>(<span style="color:#2b91af;">Paragraph</span>));<br /> style.Setters.Add(<span style="color:#0000ff;">new</span> <span style="color:#2b91af;">Setter</span>(<span style="color:#2b91af;">Block</span>.MarginProperty, <span style="color:#0000ff;">new</span> <span style="color:#2b91af;">Thickness</span>(0)));<br /> flowDocument.Resources.Add(<span style="color:#0000ff;">typeof</span>(<span style="color:#2b91af;">Paragraph</span>), style);
</p>
</div>
</div>
</div>
<p>This will implicitly apply a margin of zero to each paragraph when it is created.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/goalbook.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/goalbook.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/goalbook.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/goalbook.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/goalbook.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/goalbook.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/goalbook.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/goalbook.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/goalbook.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/goalbook.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/goalbook.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/goalbook.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/goalbook.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/goalbook.wordpress.com/89/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=goalbook.wordpress.com&amp;blog=7325786&amp;post=89&amp;subd=goalbook&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://goalbook.wordpress.com/2009/07/17/set-wpf-style-in-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/272f1f0e08a7233f936704f93725e664?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Mark Brownsword</media:title>
		</media:content>
	</item>
		<item>
		<title>Activate Hyperlinks in FlowDocument</title>
		<link>http://goalbook.wordpress.com/2009/06/13/activate-hyperlinks-in-flowdocument/</link>
		<comments>http://goalbook.wordpress.com/2009/06/13/activate-hyperlinks-in-flowdocument/#comments</comments>
		<pubDate>Fri, 12 Jun 2009 22:51:40 +0000</pubDate>
		<dc:creator>Mark Brownsword</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://goalbook.wordpress.com/2009/06/13/activate-hyperlinks-in-flowdocument/</guid>
		<description><![CDATA[When a FlowDocument is loaded into the Wpf RichTextBox the hyperlinks need to be wired up to an event handler. Starting with the FlowDocument.Blocks collection, it is necessary to recursively move through the FlowDocument checking each Inline. &#160; Also, In the Xaml declaration for RichTextBox set IsDocumentEnabled = “True”.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=goalbook.wordpress.com&amp;blog=7325786&amp;post=82&amp;subd=goalbook&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>When a FlowDocument is loaded into the Wpf RichTextBox the hyperlinks need to be wired up to an event handler. Starting with the FlowDocument.Blocks collection, it is necessary to recursively move through the FlowDocument checking each Inline. </p>
<p><a href="http://goalbook.files.wordpress.com/2009/06/hyperlinks2.png"><img style="border-bottom:0;border-left:0;display:inline;border-top:0;border-right:0;" title="Hyperlinks" border="0" alt="Hyperlinks" src="http://goalbook.files.wordpress.com/2009/06/hyperlinks_thumb2.png?w=461&#038;h=768" width="461" height="768" /></a> </p>
<p>&#160;</p>
<p>Also, In the Xaml declaration for RichTextBox set IsDocumentEnabled = “True”.<a href="http://goalbook.files.wordpress.com/2009/06/richtextbox.png"><img style="border-bottom:0;border-left:0;display:inline;border-top:0;border-right:0;" title="RichTextBox" border="0" alt="RichTextBox" src="http://goalbook.files.wordpress.com/2009/06/richtextbox_thumb.png?w=454&#038;h=45" width="454" height="45" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/goalbook.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/goalbook.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/goalbook.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/goalbook.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/goalbook.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/goalbook.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/goalbook.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/goalbook.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/goalbook.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/goalbook.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/goalbook.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/goalbook.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/goalbook.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/goalbook.wordpress.com/82/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=goalbook.wordpress.com&amp;blog=7325786&amp;post=82&amp;subd=goalbook&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://goalbook.wordpress.com/2009/06/13/activate-hyperlinks-in-flowdocument/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/272f1f0e08a7233f936704f93725e664?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Mark Brownsword</media:title>
		</media:content>

		<media:content url="http://goalbook.files.wordpress.com/2009/06/hyperlinks_thumb2.png" medium="image">
			<media:title type="html">Hyperlinks</media:title>
		</media:content>

		<media:content url="http://goalbook.files.wordpress.com/2009/06/richtextbox_thumb.png" medium="image">
			<media:title type="html">RichTextBox</media:title>
		</media:content>
	</item>
		<item>
		<title>Implementing the Notes Editor</title>
		<link>http://goalbook.wordpress.com/2009/06/07/implementing-the-notes-editor/</link>
		<comments>http://goalbook.wordpress.com/2009/06/07/implementing-the-notes-editor/#comments</comments>
		<pubDate>Sun, 07 Jun 2009 04:29:58 +0000</pubDate>
		<dc:creator>Mark Brownsword</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://goalbook.wordpress.com/2009/06/07/implementing-the-notes-editor/</guid>
		<description><![CDATA[I’ve spent a lot of time investigating options for implementing the GoalBook Notes Editor. Initially I looked at the .NET Web Browser Control with its Html editing capability (through MSHTML). Then I considered the Wpf Rich TextBox (which uses FlowDocument). Both of these options have thrown up design challenges. The Web Browser Control provides full [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=goalbook.wordpress.com&amp;blog=7325786&amp;post=74&amp;subd=goalbook&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I’ve spent a lot of time investigating options for implementing the GoalBook Notes Editor. </p>
<p>Initially I looked at the .NET Web Browser Control with its Html editing capability (through MSHTML). Then I considered the Wpf Rich TextBox (which uses FlowDocument). Both of these options have thrown up design challenges. </p>
<p>The Web Browser Control provides full compatibility with the Toodledo notes format, but is an interop solution. It also requires the use of a template to format the printed output. While the Wpf Rich TextBox provides only partial compatibility (ordered and bulleted lists are different in Html) with the Toodledo notes format and requires a considerable amount of parsing and conversion of the notes text.</p>
<p>My preference has been to use the Wpf Rich TextBox because of its use of FlowDocument (which is compatible with the printing functionality in GoalBook) and because it is a pure Wpf solution.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/goalbook.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/goalbook.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/goalbook.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/goalbook.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/goalbook.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/goalbook.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/goalbook.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/goalbook.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/goalbook.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/goalbook.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/goalbook.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/goalbook.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/goalbook.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/goalbook.wordpress.com/74/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=goalbook.wordpress.com&amp;blog=7325786&amp;post=74&amp;subd=goalbook&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://goalbook.wordpress.com/2009/06/07/implementing-the-notes-editor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/272f1f0e08a7233f936704f93725e664?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Mark Brownsword</media:title>
		</media:content>
	</item>
		<item>
		<title>Printing the FlowDocument</title>
		<link>http://goalbook.wordpress.com/2009/05/20/printing-the-flowdocument/</link>
		<comments>http://goalbook.wordpress.com/2009/05/20/printing-the-flowdocument/#comments</comments>
		<pubDate>Tue, 19 May 2009 20:41:10 +0000</pubDate>
		<dc:creator>Mark Brownsword</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://goalbook.wordpress.com/2009/05/20/printing-the-flowdocument/</guid>
		<description><![CDATA[I’ve settled on FlowDocument as the standard type for printing in Goal Book. To allow for a header and footer in the printed document it is necessary to create a custom DocumentPaginator. Since FlowDocument is the standard type for printing, the custom paginator is called FlowDocumentPaginator. Input parameters for FlowDocumentPaginator are PageDefintion (defines header, footer) [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=goalbook.wordpress.com&amp;blog=7325786&amp;post=67&amp;subd=goalbook&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I’ve settled on FlowDocument as the standard type for printing in Goal Book. To allow for a header and footer in the printed document it is necessary to create a custom DocumentPaginator. Since FlowDocument is the standard type for printing, the custom paginator is called FlowDocumentPaginator. Input parameters for FlowDocumentPaginator are PageDefintion (defines header, footer) and the FlowDocument.</p>
<p><a href="http://goalbook.files.wordpress.com/2009/05/flowdocumentpaginator1.png"><img style="border-bottom:0;border-left:0;display:inline;border-top:0;border-right:0;" title="FlowDocumentPaginator" border="0" alt="FlowDocumentPaginator" src="http://goalbook.files.wordpress.com/2009/05/flowdocumentpaginator_thumb1.png?w=501&#038;h=94" width="501" height="94" /></a> </p>
<p>The FlowDocumentPaginator creates and returns DocumentPage instances with the header and footer located at predefined offsets. </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/goalbook.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/goalbook.wordpress.com/67/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/goalbook.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/goalbook.wordpress.com/67/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/goalbook.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/goalbook.wordpress.com/67/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/goalbook.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/goalbook.wordpress.com/67/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/goalbook.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/goalbook.wordpress.com/67/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/goalbook.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/goalbook.wordpress.com/67/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/goalbook.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/goalbook.wordpress.com/67/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=goalbook.wordpress.com&amp;blog=7325786&amp;post=67&amp;subd=goalbook&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://goalbook.wordpress.com/2009/05/20/printing-the-flowdocument/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/272f1f0e08a7233f936704f93725e664?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Mark Brownsword</media:title>
		</media:content>

		<media:content url="http://goalbook.files.wordpress.com/2009/05/flowdocumentpaginator_thumb1.png" medium="image">
			<media:title type="html">FlowDocumentPaginator</media:title>
		</media:content>
	</item>
		<item>
		<title>Goal Book wins!</title>
		<link>http://goalbook.wordpress.com/2009/05/20/goal-book-wins/</link>
		<comments>http://goalbook.wordpress.com/2009/05/20/goal-book-wins/#comments</comments>
		<pubDate>Tue, 19 May 2009 19:51:58 +0000</pubDate>
		<dc:creator>Mark Brownsword</dc:creator>
				<category><![CDATA[Announcement]]></category>

		<guid isPermaLink="false">http://goalbook.wordpress.com/2009/05/20/goal-book-wins/</guid>
		<description><![CDATA[Goal Book has been selected as the April winner for CodeProject’s Smart Client Competition. Thanks CodeProject!<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=goalbook.wordpress.com&amp;blog=7325786&amp;post=64&amp;subd=goalbook&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Goal Book has been selected as the April winner for <a href="http://www.codeproject.com/">CodeProject’s</a> Smart Client Competition. Thanks CodeProject!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/goalbook.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/goalbook.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/goalbook.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/goalbook.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/goalbook.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/goalbook.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/goalbook.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/goalbook.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/goalbook.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/goalbook.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/goalbook.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/goalbook.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/goalbook.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/goalbook.wordpress.com/64/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=goalbook.wordpress.com&amp;blog=7325786&amp;post=64&amp;subd=goalbook&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://goalbook.wordpress.com/2009/05/20/goal-book-wins/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/272f1f0e08a7233f936704f93725e664?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Mark Brownsword</media:title>
		</media:content>
	</item>
		<item>
		<title>Grouping the Notes by Folder</title>
		<link>http://goalbook.wordpress.com/2009/05/13/grouping-the-notes-by-folder/</link>
		<comments>http://goalbook.wordpress.com/2009/05/13/grouping-the-notes-by-folder/#comments</comments>
		<pubDate>Wed, 13 May 2009 11:03:38 +0000</pubDate>
		<dc:creator>Mark Brownsword</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://goalbook.wordpress.com/2009/05/13/grouping-the-notes-by-folder/</guid>
		<description><![CDATA[Toodledo groups Notes by Folder, with a user option to order notes either alphabetically or in any order the user chooses (Folders have a corresponding numeric order field to indicate what this order is). To achieve this user defined Folder ordering in the Infragistics XamDatagrid it is necessary to implement a custom SortComparer and GroupByComparer [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=goalbook.wordpress.com&amp;blog=7325786&amp;post=46&amp;subd=goalbook&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Toodledo groups Notes by Folder, with a user option to order notes either alphabetically or in any order the user chooses (Folders have a corresponding numeric order field to indicate what this order is). </p>
<p>To achieve this user defined Folder ordering in the Infragistics XamDatagrid it is necessary to implement a custom SortComparer and GroupByComparer because the XamDatagrid will sort the Folders alphabetically by default. </p>
<p><a href="http://goalbook.files.wordpress.com/2009/05/notes5.png"><img style="border-bottom:0;border-left:0;display:inline;border-top:0;border-right:0;" title="Notes" border="0" alt="Notes" src="http://goalbook.files.wordpress.com/2009/05/notes_thumb5.png?w=400&#038;h=87" width="400" height="87" /></a> </p>
<p>The SortComparer and GroupByComparer plug into the XamDatagrid’s Field settings and are implemented using the standard IComparer interface. When each Folder name is presented for sorting, it’s corresponding order field is obtained and the comparison is performed using this numeric value rather than the Folder name.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/goalbook.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/goalbook.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/goalbook.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/goalbook.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/goalbook.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/goalbook.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/goalbook.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/goalbook.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/goalbook.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/goalbook.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/goalbook.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/goalbook.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/goalbook.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/goalbook.wordpress.com/46/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=goalbook.wordpress.com&amp;blog=7325786&amp;post=46&amp;subd=goalbook&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://goalbook.wordpress.com/2009/05/13/grouping-the-notes-by-folder/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/272f1f0e08a7233f936704f93725e664?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Mark Brownsword</media:title>
		</media:content>

		<media:content url="http://goalbook.files.wordpress.com/2009/05/notes_thumb5.png" medium="image">
			<media:title type="html">Notes</media:title>
		</media:content>
	</item>
		<item>
		<title>Coding Standards</title>
		<link>http://goalbook.wordpress.com/2009/05/05/quality/</link>
		<comments>http://goalbook.wordpress.com/2009/05/05/quality/#comments</comments>
		<pubDate>Tue, 05 May 2009 11:15:43 +0000</pubDate>
		<dc:creator>Mark Brownsword</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://goalbook.wordpress.com/2009/05/05/quality/</guid>
		<description><![CDATA[I&#8217;ve set an objective to build the Notes module StyleCop compliant. This has required some changes to the coding style used in GoalBook with the most obvious being no more use of underscore prefixes for class variables. StyleCop requires all class variables to be prefixed with &#8216;this&#8217; to indicate they belong to the class instance. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=goalbook.wordpress.com&amp;blog=7325786&amp;post=41&amp;subd=goalbook&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve set an objective to build the Notes module <a href="http://blogs.msdn.com/sourceanalysis/">StyleCop</a> compliant. This has required some changes to the coding style used in GoalBook with the most obvious being no more use of underscore prefixes for class variables. StyleCop requires all class variables to be prefixed with &#8216;this&#8217; to indicate they belong to the class instance. </p>
<p>The result that I can see is the GoalBook code is cleaner and more professional and that is the result I was after. StyleCop is like a mentor constantly reviewing and pointing out where improvements are required and when used in a team provides an independent agreed coding standard. </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/goalbook.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/goalbook.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/goalbook.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/goalbook.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/goalbook.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/goalbook.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/goalbook.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/goalbook.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/goalbook.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/goalbook.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/goalbook.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/goalbook.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/goalbook.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/goalbook.wordpress.com/41/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=goalbook.wordpress.com&amp;blog=7325786&amp;post=41&amp;subd=goalbook&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://goalbook.wordpress.com/2009/05/05/quality/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/272f1f0e08a7233f936704f93725e664?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Mark Brownsword</media:title>
		</media:content>
	</item>
	</channel>
</rss>
