<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Change Font Style</title>
	<atom:link href="http://www.csharp411.com/change-font-style/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.csharp411.com/change-font-style/</link>
	<description>C# Information, Code, Tips and News</description>
	<lastBuildDate>Sat, 24 Jul 2010 01:26:51 -0400</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Jamatrix</title>
		<link>http://www.csharp411.com/change-font-style/comment-page-1/#comment-5277</link>
		<dc:creator>Jamatrix</dc:creator>
		<pubDate>Thu, 10 Sep 2009 22:04:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.mini-tools.com/at2/csharp/wordpress/change-font-style/#comment-5277</guid>
		<description>Use the string value to create a font family object then create and assign a  new font with that font family object and the size as a float

FontFamily fm = new FontFamily(&quot;Mistral&quot;);
lblTime.Font = new Font(fm, 45);</description>
		<content:encoded><![CDATA[<p>Use the string value to create a font family object then create and assign a  new font with that font family object and the size as a float</p>
<p>FontFamily fm = new FontFamily("Mistral");<br />
lblTime.Font = new Font(fm, 45);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick H</title>
		<link>http://www.csharp411.com/change-font-style/comment-page-1/#comment-5274</link>
		<dc:creator>Nick H</dc:creator>
		<pubDate>Wed, 09 Sep 2009 03:56:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.mini-tools.com/at2/csharp/wordpress/change-font-style/#comment-5274</guid>
		<description>You can set it to FontStyle.Regular to clean all styles fast.</description>
		<content:encoded><![CDATA[<p>You can set it to FontStyle.Regular to clean all styles fast.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: timm</title>
		<link>http://www.csharp411.com/change-font-style/comment-page-1/#comment-4581</link>
		<dc:creator>timm</dc:creator>
		<pubDate>Tue, 05 May 2009 12:46:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.mini-tools.com/at2/csharp/wordpress/change-font-style/#comment-4581</guid>
		<description>Sanjay, that doesn&#039;t work.  Font.Bold is a read-only property (no setter).</description>
		<content:encoded><![CDATA[<p>Sanjay, that doesn't work.  Font.Bold is a read-only property (no setter).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sanjay vishwakarma</title>
		<link>http://www.csharp411.com/change-font-style/comment-page-1/#comment-4580</link>
		<dc:creator>sanjay vishwakarma</dc:creator>
		<pubDate>Tue, 05 May 2009 12:28:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.mini-tools.com/at2/csharp/wordpress/change-font-style/#comment-4580</guid>
		<description>Lable mylable=new Lable();
mylable.Font.Bold=true;</description>
		<content:encoded><![CDATA[<p>Lable mylable=new Lable();<br />
mylable.Font.Bold=true;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christian</title>
		<link>http://www.csharp411.com/change-font-style/comment-page-1/#comment-3615</link>
		<dc:creator>Christian</dc:creator>
		<pubDate>Thu, 16 Oct 2008 12:59:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.mini-tools.com/at2/csharp/wordpress/change-font-style/#comment-3615</guid>
		<description>Very helpful... Many thanks!</description>
		<content:encoded><![CDATA[<p>Very helpful&#8230; Many thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: timm</title>
		<link>http://www.csharp411.com/change-font-style/comment-page-1/#comment-3614</link>
		<dc:creator>timm</dc:creator>
		<pubDate>Thu, 16 Oct 2008 12:52:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.mini-tools.com/at2/csharp/wordpress/change-font-style/#comment-3614</guid>
		<description>To clear a flag in an enumeration, you would use the following format:

fontStyle &amp;= ~FontStyle.Italic;

Note the tilde ~ before FontStyle.Italic.  This inverts the flag, then you are AND-ing it with the original fontStyle.  This preserves all flags except FontStyle.Italic, which effectively &quot;shuts off&quot; the italic style.</description>
		<content:encoded><![CDATA[<p>To clear a flag in an enumeration, you would use the following format:</p>
<p>fontStyle &#038;= ~FontStyle.Italic;</p>
<p>Note the tilde ~ before FontStyle.Italic.  This inverts the flag, then you are AND-ing it with the original fontStyle.  This preserves all flags except FontStyle.Italic, which effectively "shuts off" the italic style.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christian</title>
		<link>http://www.csharp411.com/change-font-style/comment-page-1/#comment-3613</link>
		<dc:creator>Christian</dc:creator>
		<pubDate>Thu, 16 Oct 2008 08:00:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.mini-tools.com/at2/csharp/wordpress/change-font-style/#comment-3613</guid>
		<description>If my FontStyle is set to Bold AND Italic, then I set fontStyle &amp;= FontStyle.Italic;
in order to keep activated just the Bold style, the system switch off all the styles so as a result the font is turned into Regular.

How can I switch off just a style (Bold, Italic or Underline) at a time?

Thanks!
C.</description>
		<content:encoded><![CDATA[<p>If my FontStyle is set to Bold AND Italic, then I set fontStyle &amp;= FontStyle.Italic;<br />
in order to keep activated just the Bold style, the system switch off all the styles so as a result the font is turned into Regular.</p>
<p>How can I switch off just a style (Bold, Italic or Underline) at a time?</p>
<p>Thanks!<br />
C.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tom</title>
		<link>http://www.csharp411.com/change-font-style/comment-page-1/#comment-2115</link>
		<dc:creator>tom</dc:creator>
		<pubDate>Sat, 19 Jul 2008 00:57:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.mini-tools.com/at2/csharp/wordpress/change-font-style/#comment-2115</guid>
		<description>A, BTW:

If you want to clear all styles fast use this method:

static public Font CleanFont(Font font)
  {  if (font != null)
        {  FontStyle fontStyle = font.Style;
            
            fontStyle &amp;= FontStyle.Bold;
            fontStyle &amp;= FontStyle.Italic;
            fontStyle &amp;= FontStyle.Strikeout;
            fontStyle &amp;= FontStyle.Underline;

            font = new Font(font, fontStyle);
        }
     return font;
  }</description>
		<content:encoded><![CDATA[<p>A, BTW:</p>
<p>If you want to clear all styles fast use this method:</p>
<p>static public Font CleanFont(Font font)<br />
  {  if (font != null)<br />
        {  FontStyle fontStyle = font.Style;</p>
<p>            fontStyle &amp;= FontStyle.Bold;<br />
            fontStyle &amp;= FontStyle.Italic;<br />
            fontStyle &amp;= FontStyle.Strikeout;<br />
            fontStyle &amp;= FontStyle.Underline;</p>
<p>            font = new Font(font, fontStyle);<br />
        }<br />
     return font;<br />
  }</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tom</title>
		<link>http://www.csharp411.com/change-font-style/comment-page-1/#comment-2114</link>
		<dc:creator>tom</dc:creator>
		<pubDate>Sat, 19 Jul 2008 00:53:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.mini-tools.com/at2/csharp/wordpress/change-font-style/#comment-2114</guid>
		<description>THANK YOU!</description>
		<content:encoded><![CDATA[<p>THANK YOU!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vu thanh Binh</title>
		<link>http://www.csharp411.com/change-font-style/comment-page-1/#comment-32</link>
		<dc:creator>Vu thanh Binh</dc:creator>
		<pubDate>Fri, 29 Feb 2008 08:46:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.mini-tools.com/at2/csharp/wordpress/change-font-style/#comment-32</guid>
		<description>You code is correct in only case that all text is the same font name. I mean if your text mixes font(fontname),you coldn&#039;t do like that. I have trouble to change fontstyle with the text that has one part in Times new roman and one part in Arial</description>
		<content:encoded><![CDATA[<p>You code is correct in only case that all text is the same font name. I mean if your text mixes font(fontname),you coldn't do like that. I have trouble to change fontstyle with the text that has one part in Times new roman and one part in Arial</p>
]]></content:encoded>
	</item>
</channel>
</rss>
