<?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>Code Sticks</title>
	<atom:link href="http://codesticks.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://codesticks.wordpress.com</link>
	<description>C#, WPF XAML SOFTWARE DEVELOPEMENT BLOG.</description>
	<lastBuildDate>Wed, 11 May 2011 13:38:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='codesticks.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Code Sticks</title>
		<link>http://codesticks.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://codesticks.wordpress.com/osd.xml" title="Code Sticks" />
	<atom:link rel='hub' href='http://codesticks.wordpress.com/?pushpress=hub'/>
		<item>
		<title>To wrap or Not to Wrap Exceptions</title>
		<link>http://codesticks.wordpress.com/2011/05/11/to-wrap-or-not-to-wrap-exceptions/</link>
		<comments>http://codesticks.wordpress.com/2011/05/11/to-wrap-or-not-to-wrap-exceptions/#comments</comments>
		<pubDate>Wed, 11 May 2011 13:38:39 +0000</pubDate>
		<dc:creator>winglinglang</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://codesticks.wordpress.com/?p=49</guid>
		<description><![CDATA[We had this argument whether we should wrap C# Exception or not. I found this articel that explains it nicely: Wrapping Exceptions When wrapping an Exception we catch the exception and create a new exception with the InnerException property set to the old exception. This should not be done, unles for critical Exceptions where the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codesticks.wordpress.com&amp;blog=10168620&amp;post=49&amp;subd=codesticks&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>We had this argument whether we should wrap C# Exception or not.</p>
<p>I found this articel that explains it nicely:</p>
<ul>
<li><a title="Wrapping Exceptions" href="http://msdn.microsoft.com/en-us/library/ms229049.aspx">Wrapping Exceptions</a></li>
</ul>
<p>When wrapping an Exception we catch the exception and create a new exception with the InnerException property set to the old exception.</p>
<p>This should not be done, unles for critical Exceptions where the bottom exception does not make sense in the function context.</p>
<p>Also be aware that if you just re-throw the exception it could reset the Stack Trace. Depending on if you want this behavior or not.</p>
<p>See Example Below; The Exception is thrown in a function called Test3</p>
<p><pre class="brush: csharp;">

private void test1()
 {
   try
   {
     test2();
   }
   catch (Exception e)
   {
     throw e;
   }
 }
</pre></p>
<p>System.OperationCanceledException was unhandled<br />
Message=The operation was canceled.<br />
Source=DataContextTest<br />
StackTrace:<br />
at <span style="color:#ff0000;">DataContextTest.MainWindow.test1() <strong><span style="color:#339966;">//Note this should indicate DataContextTest.MainWindow.test3()<br />
</span></strong></span>at DataContextTest.MainWindow.Action_Click(Object sender, RoutedEventArgs e)<br />
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)<br />
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)<br />
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)<br />
at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)<br />
at System.Windows.Controls.Primitives.ButtonBase.OnClick()<br />
at System.Windows.Controls.Button.OnClick()</p>
<p><pre class="brush: csharp;">

private void test1()
 {
   try
   {
     test2();
   }
   catch (Exception e)
   {
     throw;
   }
 }

</pre></p>
<p>System.OperationCanceledException was unhandled<br />
Message=The operation was canceled.<br />
Source=DataContextTest<br />
StackTrace:<br />
<strong><span style="color:#339966;">at DataContextTest.MainWindow.test3() </span></strong><br />
at DataContextTest.MainWindow.test2()<br />
at DataContextTest.MainWindow.test1()<br />
at DataContextTest.MainWindow.Action_Click(Object sender, RoutedEventArgs e) i<br />
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)<br />
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)<br />
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)<br />
at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)<br />
at System.Windows.Controls.Primitives.ButtonBase.OnClick()<br />
at System.Windows.Controls.Button.OnClick()</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/codesticks.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/codesticks.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/codesticks.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/codesticks.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/codesticks.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/codesticks.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/codesticks.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/codesticks.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/codesticks.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/codesticks.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/codesticks.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/codesticks.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/codesticks.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/codesticks.wordpress.com/49/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codesticks.wordpress.com&amp;blog=10168620&amp;post=49&amp;subd=codesticks&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://codesticks.wordpress.com/2011/05/11/to-wrap-or-not-to-wrap-exceptions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ef1c1c1ff6f7b1204b333f25293319ac?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">winglinglang</media:title>
		</media:content>
	</item>
		<item>
		<title>Deleting Sub Folders</title>
		<link>http://codesticks.wordpress.com/2010/10/17/deleting-sub-folders/</link>
		<comments>http://codesticks.wordpress.com/2010/10/17/deleting-sub-folders/#comments</comments>
		<pubDate>Sun, 17 Oct 2010 09:08:08 +0000</pubDate>
		<dc:creator>winglinglang</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://codesticks.wordpress.com/?p=45</guid>
		<description><![CDATA[After running a tool like svn, it creates a &#8216;.svn&#8217; folder in each sub folder. To clean your folder from the svn folders or delete all sub folders run the command below in the Windows  &#8217;Command&#8217; window. Open the Command window by typing &#8216;cmd&#8217; in the &#8216;Run&#8217; Box. I Recommend you first test what will [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codesticks.wordpress.com&amp;blog=10168620&amp;post=45&amp;subd=codesticks&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>After running a tool like svn, it creates a &#8216;.svn&#8217; folder in each sub folder. To clean your folder from the svn folders or delete all sub folders run the command below in the Windows  &#8217;Command&#8217; window.</p>
<p>Open the Command window by typing &#8216;cmd&#8217; in the &#8216;Run&#8217; Box.</p>
<p><span style="color:#339966;">I Recommend you first test what will be deleted by running this command.</span></p>
<pre>for /r %i in (.svn) do @echo rd %i /S /Q</pre>
<p><span style="color:#339966;">After you are happy that the correct folders will be deleted run the same command without the echo.</span></p>
<pre>for /r %i in (.svn) do rd %i /S /Q
</pre>
<p>&nbsp;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/codesticks.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/codesticks.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/codesticks.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/codesticks.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/codesticks.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/codesticks.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/codesticks.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/codesticks.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/codesticks.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/codesticks.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/codesticks.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/codesticks.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/codesticks.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/codesticks.wordpress.com/45/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codesticks.wordpress.com&amp;blog=10168620&amp;post=45&amp;subd=codesticks&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://codesticks.wordpress.com/2010/10/17/deleting-sub-folders/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ef1c1c1ff6f7b1204b333f25293319ac?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">winglinglang</media:title>
		</media:content>
	</item>
		<item>
		<title>WPFToolkit Calendar Control Step trough</title>
		<link>http://codesticks.wordpress.com/2009/11/15/wpftoolkit-calendar-control-step-trough/</link>
		<comments>http://codesticks.wordpress.com/2009/11/15/wpftoolkit-calendar-control-step-trough/#comments</comments>
		<pubDate>Sun, 15 Nov 2009 14:07:54 +0000</pubDate>
		<dc:creator>winglinglang</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[WPF Toolkit]]></category>
		<category><![CDATA[XAML]]></category>

		<guid isPermaLink="false">http://codesticks.wordpress.com/?p=25</guid>
		<description><![CDATA[In this section we will dissect the wpf toolkit calendar control. To learn more on how Microsoft codes for wpf. One of the challenges I had writing my own calendar control and some of the samples I looked at on the web was to display the day&#8217;s in the calendar control. At first it sounds easy, you use a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codesticks.wordpress.com&amp;blog=10168620&amp;post=25&amp;subd=codesticks&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In this section we will dissect the wpf toolkit calendar control. To learn more on how Microsoft codes for wpf.</p>
<p>One of the challenges I had writing my own calendar control and some of the samples I looked at on the web was to display the day&#8217;s in the calendar control. At first it sounds easy, you use a uniform grid control with 7 columns and bind to a list of day&#8217;s, another solution was to use a list box and dived the days into weeks, then you have a week template and list box template. All very well. The problem was where do you store the list of day&#8217;s neatly away from the controls user yet make it easy to access for the data binding and flexible for new templates and styles to be applied.</p>
<p>Let see how the toolkit team did it.</p>
<h3>WPF Toolkit Calendar Control</h3>
<div id="attachment_28" class="wp-caption alignnone" style="width: 201px"><img class="size-full wp-image-28" title="Calendar" src="http://codesticks.files.wordpress.com/2009/11/calendar1.png?w=470" alt="Calendar"   /><p class="wp-caption-text">WPF ToolKit Calendar Control</p></div>
<p>Lets start at the Calendar style, From the main <strong>Calendar </strong>style they have a <strong>CalendarItem.  <span style="font-weight:normal;">The <strong>CalendarItem </strong>is a WPF Control on its own, a nice future of the Toolkit Calendar is that it support multiple Views, this is all handled by the CalendarItem style. Having the Calendar Control Contain one CalendarItem is a clever way of Hiding the Control Code from the actual code the developer will want to see when consuming the control. </span></strong></p>
<p>The Toolkit CalendarItem use a Grid to display the day&#8217;s with 7 columns and 7 rows fields called &#8216;<em>PART_MonthView</em>&#8216; the grid is contained in parent grid with 2 rows and 3 Columns. The parent grid displays the left and right arrows and the heading.</p>
<h3>Filling the Days in the PART_MonthView</h3>
<p>After the Control Template is set, The C# code extracts all the Template &#8216;PARTs&#8217; and assign it too internal variables prefixed with underscore. the one we are interested in is &#8216;_monthView&#8217; which is the grid with 7 rows and 7 columns.</p>
<p>_monthView is populated with &#8216;CalendarDayButton&#8217; Controls using a standard loop. The CalendarItem Control Populates the grid via a function &#8216;PopulateGrids()&#8217;</p>
<p><strong>PopulateGrids() </strong>Sets the CalendarDayButton Owner and assign the events and binds the style property.</p>
<p><strong>private void SetMonthModeDayTitles() <span style="font-weight:normal;">Sets the Day Titles by looping trought the 1 ste 7 cells  in the Month View Grid. Then the day&#8217;s are set using the SetMonthModeCalendarDayButtons function. </span></strong></p>
<p><strong><span style="font-weight:normal;">Here is a quick view of this function.</span></strong></p>
<p><pre class="brush: csharp;">
private void SetMonthModeCalendarDayButtons()
{
 DateTime firstDayOfMonth = DateTimeHelper.DiscardDayTime(DisplayDate);
 int lastMonthToDisplay = GetNumberOfDisplayedDaysFromPreviousMonth(firstDayOfMonth);
 bool isMinMonth = DateTimeHelper.CompareYearMonth(firstDayOfMonth,DateTime.MinValue) &lt;= 0;
 bool isMaxMonth = DateTimeHelper.CompareYearMonth(firstDayOfMonth,DateTime.MaxValue) &gt;= 0;
 int daysInMonth =_calendar.GetDaysInMonth(firstDayOfMonth.Year, firstDayOfMonth.Month);
 int count = ROWS * COLS;

 //Loop the cell's ignoring the first seven as they contain the day names for the title.
 for (int childIndex = COLS; childIndex &lt; count; childIndex++)
 {
 CalendarDayButton childButton = _monthView.Children[childIndex] as CalendarDayButton;
 Debug.Assert(childButton !=null);
 int dayOffset = childIndex - lastMonthToDisplay- COLS;

  //Set DayButton Control with the new Content.
 if ((!isMinMonth || (dayOffset &gt;= 0)) &amp;&amp;(!isMaxMonth || (dayOffset &lt; daysInMonth)))
 {
 DateTime dateToAdd =_calendar.AddDays(firstDayOfMonth, dayOffset);
 //Sets and Calculates all the Properties for the Day
 SetMonthModeDayButtonState(childButton, dateToAdd);
 childButton.DataContext = dateToAdd;
 childButton.SetContentInternal(DateTimeHelper.ToDayString(dateToAdd));
 }
 else
 {
 SetMonthModeDayButtonState(childButton, null);
 childButton.DataContext = null;
 childButton.SetContentInternal(DateTimeHelper.ToDayString(null));
 }
 }
}
</pre></p>
<ul>
<li><span style="line-height:14px;">You Hide the complexities of the month and day calculations by wrapping the actual control by anouther more userfriendly control. This they did by wrapping CalendarItem with Calendar Control. CalendarItem is in a separate name space than the Calendar control, this hide&#8217;s the control from normal developers only intrested in the Calendar, but for more advance coding you can still access the the base control by adding the primitives names space.</span></li>
<li><span style="line-height:14px;">They do not recreate the Day Controls but rather just update the content&#8217;s.</span></li>
<li><span style="line-height:14px;">There was no magic to make this work its basic clever wpf and C# coding. What was intresting to me how much they still did in code.  When starting WPF you tend to do everything in WPF, and that is not always the correct or best way of doing things. </span></li>
</ul>
<p>You can find the complete WPF ToolKit and source code here.</p>
<p><a href="http://wpf.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=29117">http://wpf.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=29117</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/codesticks.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/codesticks.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/codesticks.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/codesticks.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/codesticks.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/codesticks.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/codesticks.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/codesticks.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/codesticks.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/codesticks.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/codesticks.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/codesticks.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/codesticks.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/codesticks.wordpress.com/25/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codesticks.wordpress.com&amp;blog=10168620&amp;post=25&amp;subd=codesticks&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://codesticks.wordpress.com/2009/11/15/wpftoolkit-calendar-control-step-trough/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ef1c1c1ff6f7b1204b333f25293319ac?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">winglinglang</media:title>
		</media:content>

		<media:content url="http://codesticks.files.wordpress.com/2009/11/calendar1.png" medium="image">
			<media:title type="html">Calendar</media:title>
		</media:content>
	</item>
		<item>
		<title>List2Code</title>
		<link>http://codesticks.wordpress.com/2009/11/08/list2code/</link>
		<comments>http://codesticks.wordpress.com/2009/11/08/list2code/#comments</comments>
		<pubDate>Sun, 08 Nov 2009 19:56:47 +0000</pubDate>
		<dc:creator>winglinglang</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Code Generater]]></category>
		<category><![CDATA[CSharp]]></category>

		<guid isPermaLink="false">http://codesticks.wordpress.com/?p=18</guid>
		<description><![CDATA[List2Code is very Simple Application that takes comma delimited list and runs it a template to create code that can be copied and pasted in your application. The Goal is to quickly create large amount of properties or xml files using a comma delimited list. The Code and Source Code is available on CodePlex http://list2code.codeplex.com/ [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codesticks.wordpress.com&amp;blog=10168620&amp;post=18&amp;subd=codesticks&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>List2Code is very Simple Application that takes comma delimited list and runs it a template to create code that can be copied and pasted in your application. The Goal is to quickly create large amount of properties or xml files using a comma delimited list.</p>
<div id="attachment_19" class="wp-caption alignnone" style="width: 310px"><img class="size-medium wp-image-19 " title="List2Code" src="http://codesticks.files.wordpress.com/2009/11/list2code.png?w=300&#038;h=254" alt="Screen shot" width="300" height="254" /><p class="wp-caption-text">List2Code Main Window</p></div>
<p>The Code and Source Code is available on CodePlex <a href="http://list2code.codeplex.com/">http://list2code.codeplex.com/</a></p>
<p>Here is some Template&#8217;s You can use.</p>
<h3>Template Example&#8217;s</h3>
<p><strong>Clone a Object Template</strong><br />
<code><br />
{0}=fromobj.{0};<br />
</code></p>
<p>*where the fromobj the object is that you want to clone from.</p>
<p><strong>Normal Property Template</strong><br />
<code><br />
public {0} {1} {get;set;}<br />
</code></p>
<p><span style="color:#000000;"><strong>INotifyPropertyChanged Property Template</strong></span></p>
<p><code><br />
private {0} m_{1};<br />
public {0} {1}<br />
{<br />
get { return m_{1}; }<br />
set<br />
  {<br />
  if (value != m_{1})<br />
  {<br />
  m_{1} = value;<br />
  if (PropertyChanged != null)<br />
    PropertyChanged(this, new PropertyChangedEventArgs("{1}"));<br />
    }<br />
  }<br />
}<br />
</code></p>
<div>a Usefull SQL Query to retrieve the column names from a database table, You can copy and paste the columns names into the list2code content box to generate properties.</div>
<p><pre class="brush: sql;">
SELECT COLUMN_NAME
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME = 'TableNameGoesHere'
ORDER BY ORDINAL_POSITION
</pre></p>
<div>[thanks to <a href="http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=57418">http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=57418</a>]</div>
<div><span style="color:#888888;"><br />
</span></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/codesticks.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/codesticks.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/codesticks.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/codesticks.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/codesticks.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/codesticks.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/codesticks.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/codesticks.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/codesticks.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/codesticks.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/codesticks.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/codesticks.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/codesticks.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/codesticks.wordpress.com/18/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codesticks.wordpress.com&amp;blog=10168620&amp;post=18&amp;subd=codesticks&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://codesticks.wordpress.com/2009/11/08/list2code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ef1c1c1ff6f7b1204b333f25293319ac?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">winglinglang</media:title>
		</media:content>

		<media:content url="http://codesticks.files.wordpress.com/2009/11/list2code.png?w=300" medium="image">
			<media:title type="html">List2Code</media:title>
		</media:content>
	</item>
		<item>
		<title>Expression Blend 3</title>
		<link>http://codesticks.wordpress.com/2009/11/04/expression-blend-3/</link>
		<comments>http://codesticks.wordpress.com/2009/11/04/expression-blend-3/#comments</comments>
		<pubDate>Wed, 04 Nov 2009 08:28:33 +0000</pubDate>
		<dc:creator>winglinglang</dc:creator>
				<category><![CDATA[Quick Guide]]></category>
		<category><![CDATA[Blend 3]]></category>
		<category><![CDATA[XAML]]></category>

		<guid isPermaLink="false">http://codesticks.wordpress.com/?p=14</guid>
		<description><![CDATA[I Just installed Expresion Belnd 3, and was playing around. It has many new controls and features that was not in Blend 2, Some intresting links to get me started is. Design-time Data in Expression Blend 3 http://www.robfe.com/2009/08/design-time-data-in-expression-blend-3/ a intresting exmaple of a simple game done in Blend 3, showing of design time objects to display [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codesticks.wordpress.com&amp;blog=10168620&amp;post=14&amp;subd=codesticks&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I Just installed Expresion Belnd 3, and was playing around. It has many new controls and features that was not in Blend 2, Some intresting links to get me started is.</p>
<ul>
<li>Design-time Data in Expression Blend 3 <a href="http://www.robfe.com/2009/08/design-time-data-in-expression-blend-3/">http://www.robfe.com/2009/08/design-time-data-in-expression-blend-3/</a><br />
a intresting exmaple of a simple game done in Blend 3, showing of design time objects to display the correct gui the user will se in runtime.</li>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/codesticks.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/codesticks.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/codesticks.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/codesticks.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/codesticks.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/codesticks.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/codesticks.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/codesticks.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/codesticks.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/codesticks.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/codesticks.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/codesticks.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/codesticks.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/codesticks.wordpress.com/14/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codesticks.wordpress.com&amp;blog=10168620&amp;post=14&amp;subd=codesticks&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://codesticks.wordpress.com/2009/11/04/expression-blend-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ef1c1c1ff6f7b1204b333f25293319ac?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">winglinglang</media:title>
		</media:content>
	</item>
		<item>
		<title>Creating a WPF Control</title>
		<link>http://codesticks.wordpress.com/2009/10/30/creating-a-wpf-control/</link>
		<comments>http://codesticks.wordpress.com/2009/10/30/creating-a-wpf-control/#comments</comments>
		<pubDate>Fri, 30 Oct 2009 21:15:43 +0000</pubDate>
		<dc:creator>winglinglang</dc:creator>
				<category><![CDATA[Quick Guide]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Control]]></category>
		<category><![CDATA[WPF]]></category>
		<category><![CDATA[XAML]]></category>

		<guid isPermaLink="false">http://codesticks.wordpress.com/?p=8</guid>
		<description><![CDATA[Here is Some Basic Stuff to remember when creating a new WPF Control. 1. Remeber to set the the static property DefaultStyleKeyProperty This property links your XAML style to your Control. If you dont set this property a Default style settings your Control will not find the contol type to set it. Example: 2. a Generic [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codesticks.wordpress.com&amp;blog=10168620&amp;post=8&amp;subd=codesticks&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Here is Some Basic Stuff to remember when creating a new WPF Control.</p>
<p>1. Remeber to set the the static property <span style="color:#0000ff;">DefaultStyleKeyProperty</span> This property links your XAML style to your Control. If you dont set this property a Default style settings your Control will not find the contol type to set it.</p>
<p>Example:</p>
<p><pre class="brush: csharp;">
DefaultStyleKeyProperty.OverrideMetadata(typeof(ControlName), new FrameworkPropertyMetadata(typeof(ControlName)));
</pre></p>
<p>2. a Generic Control should focus on properties and functions to maunipilate the control behaviour and display.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/codesticks.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/codesticks.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/codesticks.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/codesticks.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/codesticks.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/codesticks.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/codesticks.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/codesticks.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/codesticks.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/codesticks.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/codesticks.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/codesticks.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/codesticks.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/codesticks.wordpress.com/8/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codesticks.wordpress.com&amp;blog=10168620&amp;post=8&amp;subd=codesticks&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://codesticks.wordpress.com/2009/10/30/creating-a-wpf-control/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ef1c1c1ff6f7b1204b333f25293319ac?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">winglinglang</media:title>
		</media:content>
	</item>
		<item>
		<title>Type reference cannot find public type named</title>
		<link>http://codesticks.wordpress.com/2009/10/30/type-reference-cannot-find-public-type-named/</link>
		<comments>http://codesticks.wordpress.com/2009/10/30/type-reference-cannot-find-public-type-named/#comments</comments>
		<pubDate>Fri, 30 Oct 2009 21:11:55 +0000</pubDate>
		<dc:creator>winglinglang</dc:creator>
				<category><![CDATA[Trouble Shooting]]></category>
		<category><![CDATA[XAML]]></category>

		<guid isPermaLink="false">http://codesticks.wordpress.com/?p=6</guid>
		<description><![CDATA[Error &#8220;Type reference cannot find public type named&#8221; while running my applications. The following fixed help for me. In my XAML template I had a button control calling a Command. &#60;button column=&#8221;0&#8243; command=&#8221;MonthSelector.DecreaseMonth&#8221;/&#62; MonthSelector is the class name in the namespace. xmlns:gclr=&#8221;clr-namespace:GControls.Date&#8221; You need to add the namespace in the command refrence. Example: &#60;button column=&#8221;0&#8243; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codesticks.wordpress.com&amp;blog=10168620&amp;post=6&amp;subd=codesticks&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Error &#8220;Type reference cannot find public type named&#8221; while running my applications. The following fixed help for me.</p>
<p>In my XAML template I had a button control calling a Command.<br />
&lt;button column=&#8221;0&#8243; command=&#8221;MonthSelector.DecreaseMonth&#8221;/&gt;</p>
<p>MonthSelector is the class name in the namespace.</p>
<p>xmlns:<strong>gclr</strong>=&#8221;clr-namespace:GControls.Date&#8221;</p>
<p>You need to add the namespace in the command refrence.</p>
<p><strong>Example</strong>:</p>
<p>&lt;button column=&#8221;0&#8243; command=&#8221;<strong>gclr</strong>:MonthSelector.DecreaseMonth&#8221;&gt;&lt;/button&gt;</p>
<p>Other Possible Problems</p>
<ul>
<li>Spaces in you application name. <a href="http://siderite.blogspot.com/2009/06/vs2008-wpf-designer-throws-error-type.html">vs2008-wpf-designer-throws-error-type</a></li>
</ul>
<ul>
<li>Having the assembly in the namespace while in the same dll as it is used in. Remove the assembly name.</li>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/codesticks.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/codesticks.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/codesticks.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/codesticks.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/codesticks.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/codesticks.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/codesticks.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/codesticks.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/codesticks.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/codesticks.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/codesticks.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/codesticks.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/codesticks.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/codesticks.wordpress.com/6/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codesticks.wordpress.com&amp;blog=10168620&amp;post=6&amp;subd=codesticks&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://codesticks.wordpress.com/2009/10/30/type-reference-cannot-find-public-type-named/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ef1c1c1ff6f7b1204b333f25293319ac?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">winglinglang</media:title>
		</media:content>
	</item>
	</channel>
</rss>
