<?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>Everything Silverlight &#187; text</title>
	<atom:link href="http://www.michaelsnow.com/tag/text/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.michaelsnow.com</link>
	<description></description>
	<lastBuildDate>Thu, 28 Apr 2011 21:43:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Silverlight Tip of the Day #32 &#8211; BiDi &#8211; Bi-Directional Text</title>
		<link>http://www.michaelsnow.com/2010/06/23/silverlight-tip-of-the-day-32-bidi-bi-directional-text/</link>
		<comments>http://www.michaelsnow.com/2010/06/23/silverlight-tip-of-the-day-32-bidi-bi-directional-text/#comments</comments>
		<pubDate>Wed, 23 Jun 2010 19:57:33 +0000</pubDate>
		<dc:creator>Snowman</dc:creator>
				<category><![CDATA[bidi]]></category>
		<category><![CDATA[silverlight]]></category>
		<category><![CDATA[text]]></category>

		<guid isPermaLink="false">http://www.michaelsnow.com/2010/06/23/silverlight-tip-of-the-day-32-bidi-bi-directional-text/</guid>
		<description><![CDATA[BiDi or Bi-directional text is text that flows right-to-left (RTL) and left-to-right (LTR). For example, while English flows left to right other languages such as Arabic, Hebrew and Persian scripts flow right to left. Chinese characters can also be written in either RTL or LTR directions. Silverlight supports BiDi through a property called FlowDirection. This [...]]]></description>
			<content:encoded><![CDATA[<p>BiDi or Bi-directional text is text that flows right-to-left (RTL) and left-to-right (LTR). For example, while English flows left to right other languages such as Arabic, Hebrew and Persian scripts flow right to left. Chinese characters can also be written in either RTL or LTR directions.</p>
<p>Silverlight supports BiDi through a property called FlowDirection. This property can be set to either RightToLeft or the default LeftToRight.</p>
<p>The following code below demonstrates this property in action:</p>
<div class="csharpcode">
<pre class="alt">&lt;TextBlock FlowDirection=<span class="str">&quot;RightToLeft&quot;</span> Text=<span class="str">&quot;نصائح Silverlight من اليوم&quot;</span>/&gt;</pre>
<pre>&lt;TextBlock FlowDirection=<span class="str">&quot;RightToLeft&quot;</span> Text=<span class="str">&quot;Silverlight 每日提示&quot;</span>/&gt;</pre>
<pre class="alt">&lt;TextBlock FlowDirection=<span class="str">&quot;LeftToRight&quot;</span> Text=<span class="str">&quot;Silverlight Tips of the Day&quot;</span>/&gt;</pre>
</div>
<style type="text/css">
<p>.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
<p>&#160;</p>
<p>The first two TextBlocks flow RTL and the last one flows LTR.</p>
<p>Demo:<br />
  </p>
<p>[silverlight: Tip32_BIDI.xap]</p>
<p>Note that this property can also be applied to other controls such as RichTextBox, ListBox, TextBox, etc.</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:222ccbce-6607-40bd-bc98-f3a2748c0220" class="wlWriterEditableSmartContent">
<p>Source: <a href="http://www.michaelsnow.com/wp-content/uploads/2010/06/Tip32_BIDI1.zip" target="_blank">Tip32_BIDI.zip</a></p>
</div>
<p>Thanks,<br />
  <br />&#8211;Mike</p>
]]></content:encoded>
			<wfw:commentRss>http://www.michaelsnow.com/2010/06/23/silverlight-tip-of-the-day-32-bidi-bi-directional-text/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Silverlight Tip of the Day #28 &#8211; Text Trimming</title>
		<link>http://www.michaelsnow.com/2010/06/04/silverlight-tip-of-the-day-28-text-trimming/</link>
		<comments>http://www.michaelsnow.com/2010/06/04/silverlight-tip-of-the-day-28-text-trimming/#comments</comments>
		<pubDate>Fri, 04 Jun 2010 16:37:17 +0000</pubDate>
		<dc:creator>Snowman</dc:creator>
				<category><![CDATA[silverlight]]></category>
		<category><![CDATA[text trimming]]></category>
		<category><![CDATA[text]]></category>
		<category><![CDATA[trimming]]></category>

		<guid isPermaLink="false">http://www.michaelsnow.com/2010/06/04/silverlight-tip-of-the-day-28-text-trimming/</guid>
		<description><![CDATA[With Silverlight 4 came support for Text Trimming. Text Trimming is a feature that applies to TextBlocks and is used to append “…” at the end of the string if the text in the TextBlock does not fit. In WPF this can be done at the character level or the word level. Silverlight 4 only [...]]]></description>
			<content:encoded><![CDATA[<p>With Silverlight 4 came support for Text Trimming. Text Trimming is a feature that applies to TextBlocks and is used to append “…” at the end of the string if the text in the TextBlock does not fit. In WPF this can be done at the character level or the word level. Silverlight 4 only supports trimming at the word level.</p>
<p>To set it simply set the property TextTrimming to “WordEllipsis” like this:</p>
<p><span style="color: blue">&lt;</span><span style="color: #a31515">TextBlock </span><span style="color: red">x</span><span style="color: blue">:</span><span style="color: red">Name</span><span style="color: blue">=&quot;TitleTB&quot; </span><span style="color: red">TextTrimming</span><span style="color: blue">=&quot;WordEllipsis&quot;/&gt;      <br /></span></p>
<p>Programmatically it would be done like this:</p>
<p>TitleTB.TextTrimming = <span style="color: #2b91af">TextTrimming</span>.WordEllipsis;</p>
<p> <a href="http://11011.net/software/vspaste"></a>
<p>So say I have a TextBlock set to the following string:</p>
<blockquote><p>“This string is too long to fit here but you can append &#8230; by using the property TextTrimming”</p>
</blockquote>
<p>Without Trimming it would look like this (notice the word TextTrimming is just missing):</p>
<p><a href="http://www.michaelsnow.com/wp-content/uploads/2010/06/image3.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.michaelsnow.com/wp-content/uploads/2010/06/image_thumb2.png" width="108" height="109" /></a> </p>
<p>With Trimming “…” is appended letting you know there is more text:</p>
<p><a href="http://www.michaelsnow.com/wp-content/uploads/2010/06/image4.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.michaelsnow.com/wp-content/uploads/2010/06/image_thumb3.png" width="109" height="111" /></a> </p>
</p>
<p>Thanks,    <br />&#8211;Mike</p>
]]></content:encoded>
			<wfw:commentRss>http://www.michaelsnow.com/2010/06/04/silverlight-tip-of-the-day-28-text-trimming/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

