<?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/"
	>

<channel>
	<title>Stickblog &#187; c#</title>
	<atom:link href="http://the-stickman.com/category/c/feed/" rel="self" type="application/rss+xml" />
	<link>http://the-stickman.com</link>
	<description>Random developer notes</description>
	<lastBuildDate>Wed, 10 Mar 2010 15:11:27 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Changing DataGridViewRow font style in C#</title>
		<link>http://the-stickman.com/c/changing-datagridviewrow-font-style-in-c/</link>
		<comments>http://the-stickman.com/c/changing-datagridviewrow-font-style-in-c/#comments</comments>
		<pubDate>Sun, 20 Jan 2008 14:42:59 +0000</pubDate>
		<dc:creator>Stickman</dc:creator>
				<category><![CDATA[c#]]></category>

		<guid isPermaLink="false">http://the-stickman.com/c/changing-datagridviewrow-font-style-in-c/</guid>
		<description><![CDATA[Just a quick note-to-self to remind me of the (rather over-complex, if you ask me) means by which you alter the basic font style properties of a DatagridViewRow element. It involves the DataGridViewRow.DefaultCellStyle.Font property, but all the basic properties &#8212; FontFamily, Size and Style &#8212; are write-only.
In order to change them, you have to overwrite [...]]]></description>
			<content:encoded><![CDATA[<p>Just a quick note-to-self to remind me of the (rather over-complex, if you ask me) means by which you alter the basic font style properties of a DatagridViewRow element. It involves the DataGridViewRow.DefaultCellStyle.Font property, but all the basic properties &#8212; FontFamily, Size and Style &#8212; are write-only.</p>
<p>In order to change them, you have to overwrite the entire Font property by creating a new Font object and specifying its properties when you instantiate it. So for example:</p>
<blockquote><p>DataGridViewRow row = new DataGridViewRow();<br />
row.DefaultCellStyle.Font = new Font (<br />
     &#8220;Arial&#8221;, // Family<br />
     9, // Size<br />
     FontStyle.Bold // Style<br />
);
</p></blockquote>
<p>..but what if you just want to alter one of these properties, and preserve whatever is already set for the others?</p>
<p>Well if you&#8217;re creating a new row, you can&#8217;t reference the properties of the row itself (because it doesn&#8217;t exist yet) but you can refer to the corresponding settings for the row&#8217;s parent DataGridView. So lets say we just want to change the row to bold:</p>
<blockquote><p>
DataGridView data_grid = new DataGridView();<br />
DataGridViewRow row = new DataGridViewRow();<br />
row.DefaultCellStyle.Font = new Font(<br />
     data_grid.DefaultCellStyle.Font.FontFamily,<br />
     data_grid.DefaultCellStyle.Font.Size,<br />
     FontStyle.Bold<br />
);
</p></blockquote>
<p>So the default settings for font family and size are preserved, but the bold setting is changed.</p>
]]></content:encoded>
			<wfw:commentRss>http://the-stickman.com/c/changing-datagridviewrow-font-style-in-c/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>New Visual Studio Express Editions released</title>
		<link>http://the-stickman.com/c/new-visual-studio-express-editions-released/</link>
		<comments>http://the-stickman.com/c/new-visual-studio-express-editions-released/#comments</comments>
		<pubDate>Wed, 21 Nov 2007 09:44:55 +0000</pubDate>
		<dc:creator>Stickman</dc:creator>
				<category><![CDATA[c#]]></category>

		<guid isPermaLink="false">http://the-stickman.com/c/new-visual-studio-express-editions-released/</guid>
		<description><![CDATA[In my spare time, I&#8217;m still quietly hacking away at C# &#8212; courtesy of Microsoft&#8217;s free Visual Studio Express C# IDE. I noticed last night that along with the recent release of the full Visual Studio 2008 suite come updated versions of all the Express editions, which is great news.
I had a quick poke around [...]]]></description>
			<content:encoded><![CDATA[<p>In my spare time, I&#8217;m still quietly hacking away at C# &#8212; courtesy of Microsoft&#8217;s free <a href="http://www.microsoft.com/express/vcsharp/">Visual Studio Express C#</a> IDE. I noticed last night that along with the recent release of the full Visual Studio 2008 suite come updated versions of <a href="http://www.microsoft.com/express/product/">all the Express editions</a>, which is great news.</p>
<p>I had a quick poke around last night and to be honest most of the <a href="http://weblogs.asp.net/scottgu/archive/2007/11/19/visual-studio-2008-and-net-3-5-released.aspx">improvements</a> have little significance to me at this point, although I am quite interested in <a href="http://en.wikipedia.org/wiki/Language_Integrated_Query">LINQ</a>. I&#8217;m holding off on moving across just at the moment because when you open an existing solution in the new version it renders it incompatible with the old version, and I don&#8217;t have time just at the moment to upgrade all my installations. However, it is possible to run both the old and new versions on the same machine.</p>
]]></content:encoded>
			<wfw:commentRss>http://the-stickman.com/c/new-visual-studio-express-editions-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
