<?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# Development</description>
	<lastBuildDate>Fri, 03 Feb 2012 11:14:43 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: vishnu</title>
		<link>http://www.csharp411.com/change-font-style/#comment-271</link>
		<dc:creator>vishnu</dc:creator>
		<pubDate>Sat, 21 May 2011 03:04:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.mini-tools.com/at2/csharp/wordpress/change-font-style/#comment-271</guid>
		<description>i have to convert change the font and fontstyle of a lable control to &quot;ML-TTKarthika&quot; and &quot;bold&quot; respectively, i could change font by writing this code

FontFamily fm = new FontFamily(&quot;ML-TTKarthika&quot;);
            label2.Font = new Font(fm, 12);
but i couldn&#039;t cahnge fontstyle. when i written this code label1.Font.font = true; change the fontstyle a error message shows that
 Error	1	Property or indexer &#039;System.Drawing.Font.Bold&#039; cannot be assigned to -- it is read only</description>
		<content:encoded><![CDATA[<p>i have to convert change the font and fontstyle of a lable control to &#8220;ML-TTKarthika&#8221; and &#8220;bold&#8221; respectively, i could change font by writing this code</p>
<p>FontFamily fm = new FontFamily(&#8220;ML-TTKarthika&#8221;);<br />
            label2.Font = new Font(fm, 12);<br />
but i couldn&#8217;t cahnge fontstyle. when i written this code label1.Font.font = true; change the fontstyle a error message shows that<br />
 Error	1	Property or indexer &#8216;System.Drawing.Font.Bold&#8217; cannot be assigned to &#8212; it is read only</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Boubaker</title>
		<link>http://www.csharp411.com/change-font-style/#comment-270</link>
		<dc:creator>Boubaker</dc:creator>
		<pubDate>Sun, 23 Jan 2011 17:17:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.mini-tools.com/at2/csharp/wordpress/change-font-style/#comment-270</guid>
		<description>thank thats what i need</description>
		<content:encoded><![CDATA[<p>thank thats what i need</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jamatrix</title>
		<link>http://www.csharp411.com/change-font-style/#comment-269</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-269</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(&#8220;Mistral&#8221;);<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-268</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-268</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-267</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-267</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&#8217;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-266</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-266</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-265</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-265</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-264</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-264</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 &#8220;shuts off&#8221; the italic style.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christian</title>
		<link>http://www.csharp411.com/change-font-style/#comment-263</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-263</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-262</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-262</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>
</channel>
</rss>

