<?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>DoNotYet.com &#187; TextBlockControl</title>
	<atom:link href="http://www.donotyet.com/tag/textblockcontrol/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.donotyet.com</link>
	<description>Freebie Resources for Tech Users, AIR, Flex, Flash Developers and Photoshop, web Designers</description>
	<lastBuildDate>Wed, 07 Dec 2011 06:35:54 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Easily Create Your Silverlight Page With BorderControl, ToggleButtonControl &amp; ImageControl Controls etc</title>
		<link>http://www.donotyet.com/2009/10/25/easily-create-your-silverlight-page-with-bordercontrol-togglebuttoncontrol-imagecontrol-controls/</link>
		<comments>http://www.donotyet.com/2009/10/25/easily-create-your-silverlight-page-with-bordercontrol-togglebuttoncontrol-imagecontrol-controls/#comments</comments>
		<pubDate>Sun, 25 Oct 2009 08:28:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[RIA]]></category>
		<category><![CDATA[BorderControl]]></category>
		<category><![CDATA[ImageControl]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[TextBlockControl]]></category>

		<guid isPermaLink="false">http://www.donotyet.com/2009/10/25/easily-create-your-silverlight-page-with-bordercontrol-togglebuttoncontrol-imagecontrol-controls/</guid>
		<description><![CDATA[There are rich controls in Silverlight projects. Though they are really easy to use as that of HTML or Frontpage, as fresher we still need to know some basic usages of them. The top-left one applies BorderControl and TextBlockControl while the bottom-left one applies ToggleControl. And the right one is made with ImageControl. In this [...]]]></description>
			<content:encoded><![CDATA[<p>There are rich controls in Silverlight projects. Though they are really easy to use as that of HTML or Frontpage, as fresher we still need to know some basic usages of them. The top-left one applies BorderControl and TextBlockControl while the bottom-left one applies ToggleControl. And the right one is made with ImageControl. In this case we&#8217;ll use VWD2008 Expression with SP1 + Silverlight 3 Tools, and we&#8217;ll step by step get these controls listed below realized in your page:</p>
<div style="margin: 0px 0px 0px 0px;"><script type="text/javascript"><!--
google_ad_client = "pub-7859640280892154";
/* DoNotYet-Article-336-280-01 */
google_ad_slot = "0432827541";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script><script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>
<p><span id="more-973"></span></p>
<p><i>BorderControl</i>: to create rectangle boundary with its corner can be rounded.</p>
<p><i>TextBlockControl</i>: to add a text block.</p>
<p><i>CanvasControl</i>: to arrange the layout.</p>
<p><i>ToggleButtonControl</i>: to create a button with three states.</p>
<p><i>ImageControl</i>: to show pictures in the page.</p>
<p><a href="http://www.donotyet.com/wp-content/uploads/2009/10/WindowsLiveWriterEasilyCreateYourSilverlightPageWithBorde_F62Cclip_image002_2.gif"><img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="clip_image002" src="http://www.donotyet.com/wp-content/uploads/2009/10/WindowsLiveWriterEasilyCreateYourSilverlightPageWithBorde_F62Cclip_image002_thumb.gif" width="500" height="299" /></a></p>
<p>Create a blank Silverlight project, insert the codes in MainPage.xaml</p>
<p><a href="http://www.donotyet.com/wp-content/uploads/2009/10/WindowsLiveWriterEasilyCreateYourSilverlightPageWithBorde_F62Cclip_image004_2.jpg"><img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="clip_image004" src="http://www.donotyet.com/wp-content/uploads/2009/10/WindowsLiveWriterEasilyCreateYourSilverlightPageWithBorde_F62Cclip_image004_thumb.jpg" width="504" height="247" /></a></p>
<p>Notice that the default Grid markup are placed by Canvas markup. <i>Canvas Left</i> is the distance from the page&#8217;s left side to the border&#8217;s left side, similarly so does the <i>Canvas Top</i> mean. ToolTip means that when the cursor moves to the inside of the border, a tip will show up.</p>
<p>Run the project, the page effect is like the following:</p>
<p><a href="http://www.donotyet.com/wp-content/uploads/2009/10/WindowsLiveWriterEasilyCreateYourSilverlightPageWithBorde_F62Cclip_image006_2.jpg"><img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="clip_image006" src="http://www.donotyet.com/wp-content/uploads/2009/10/WindowsLiveWriterEasilyCreateYourSilverlightPageWithBorde_F62Cclip_image006_thumb.jpg" width="504" height="301" /></a></p>
<p>Then how about the ToggleButtonControl? You must have found that your media player has such a button. It can switch among three states: start, pause, and end, while most buttons are single-state or two-state. To do this, we use ToggleButtonControl. In fact the process is nearly the same as that of using Button Control, so this may be just a piece of cake to you!</p>
<p>Add codes below in MainPage.xml. Thus we create a ToggleButton named <i>myButton</i>, its original content is &#8221;<i>ToggleButton</i>&#8221;. The property <i>IsThreeState</i> is set to be <i>Tru</i>e, then the button can have three different states. If its value is <i>False</i>, it will be equal to a common two-state or single-state button. </p>
<p>ToggleButtonControl has three events: Checked, Indeterminate, and Unchecked, each presents a dependent state.</p>
<p><a href="http://www.donotyet.com/wp-content/uploads/2009/10/WindowsLiveWriterEasilyCreateYourSilverlightPageWithBorde_F62Cclip_image007_2.jpg"><img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="clip_image007" src="http://www.donotyet.com/wp-content/uploads/2009/10/WindowsLiveWriterEasilyCreateYourSilverlightPageWithBorde_F62Cclip_image007_thumb.jpg" width="504" height="253" /></a></p>
<p>Add functions dealing with the three events above:</p>
<p><a href="http://www.donotyet.com/wp-content/uploads/2009/10/WindowsLiveWriterEasilyCreateYourSilverlightPageWithBorde_F62Cclip_image009_2.gif"><img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="clip_image009" src="http://www.donotyet.com/wp-content/uploads/2009/10/WindowsLiveWriterEasilyCreateYourSilverlightPageWithBorde_F62Cclip_image009_thumb.gif" width="500" height="207" /></a></p>
<p>OK, start to run. When you move the cursor to the pink border a prompt string &quot;It&#8217;s a pink border&quot; shows up. When you repeatedly click the button its content just switch over between three phrases, presenting three states. See the pic below you&#8217;ll know exactly what the <i>Canvas.Left</i> and <i>Canvas.Top</i> is.</p>
<p><a href="http://www.donotyet.com/wp-content/uploads/2009/10/WindowsLiveWriterEasilyCreateYourSilverlightPageWithBorde_F62Cclip_image011_2.jpg"><img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="clip_image011" src="http://www.donotyet.com/wp-content/uploads/2009/10/WindowsLiveWriterEasilyCreateYourSilverlightPageWithBorde_F62Cclip_image011_thumb.jpg" width="504" height="328" /></a></p>
<p>What&#8217;s more, if you want to add one pic into your page, just add the pic stored in your PC through Solution Explorer by right-click the <i>ClientBin </i>folder, choose to add <i>Existing Item</i>:</p>
<p><a href="http://www.donotyet.com/wp-content/uploads/2009/10/WindowsLiveWriterEasilyCreateYourSilverlightPageWithBorde_F62Cclip_image012_2.jpg"><img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="clip_image012" src="http://www.donotyet.com/wp-content/uploads/2009/10/WindowsLiveWriterEasilyCreateYourSilverlightPageWithBorde_F62Cclip_image012_thumb.jpg" width="500" height="339" /></a></p>
<p>Now I have add a pic named scene.jpg.</p>
<p><a href="http://www.donotyet.com/wp-content/uploads/2009/10/WindowsLiveWriterEasilyCreateYourSilverlightPageWithBorde_F62Cclip_image014_2.gif"><img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="clip_image014" src="http://www.donotyet.com/wp-content/uploads/2009/10/WindowsLiveWriterEasilyCreateYourSilverlightPageWithBorde_F62Cclip_image014_thumb.gif" width="508" height="66" /></a></p>
<p>Then follow the pic to inset the scene.jpg into the page.</p>
<p><a href="http://www.donotyet.com/wp-content/uploads/2009/10/WindowsLiveWriterEasilyCreateYourSilverlightPageWithBorde_F62Cclip_image016_2.jpg"><img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="clip_image016" src="http://www.donotyet.com/wp-content/uploads/2009/10/WindowsLiveWriterEasilyCreateYourSilverlightPageWithBorde_F62Cclip_image016_thumb.jpg" width="508" height="65" /></a></p>
<p>Run and the final page effect will be like what the demo shows:<a href="http://www.hv-designs.co.uk/tutorials/jquery/all.html"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Demo" border="0" alt="Demo" src="http://www.donotyet.com/wp-content/uploads/2009/09/Demo3.png" width="23" height="23" /></a><a href="http://www.donotyet.com/ext/Easily-Create-Your-Silverlight-Page-With-BorderControl-ToggleButtonControl-ImageControl-Controls/borderTry.swf" target="_blank">Demo</a></p>
<h3>Related Posts</h3>
<ul class="related_post">
<li><a href="http://www.donotyet.com/2009/10/31/mouse-event-of-silverlight-3-with-full-source-code/" title="Mouse Event of Silverlight 3(with Full Source Code)">Mouse Event of Silverlight 3(with Full Source Code)</a></li>
<li><a href="http://www.donotyet.com/2009/10/30/a-simple-silverlight-application-with-button-control/" title="A Simple Silverlight Application with Button Control">A Simple Silverlight Application with Button Control</a></li>
<li><a href="http://www.donotyet.com/2009/10/28/introduction-of-microsoft-expression-blend/" title="Introduction of Microsoft Expression Blend">Introduction of Microsoft Expression Blend</a></li>
<li><a href="http://www.donotyet.com/2009/10/18/how-to-deploy-the-development-environment-for-silverlight-3/" title="How to Deploy the Development Environment for Silverlight 3">How to Deploy the Development Environment for Silverlight 3</a></li>
<li><a href="http://www.donotyet.com/2009/10/08/silverlight-is-so-charming/" title="Silverlight Is So Charming">Silverlight Is So Charming</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.donotyet.com/2009/10/25/easily-create-your-silverlight-page-with-bordercontrol-togglebuttoncontrol-imagecontrol-controls/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

