<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Amir Aryani</title>
	<atom:link href="http://amiraryani.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://amiraryani.wordpress.com</link>
	<description>My notes about WPF, SOA, LINQ and other programming topics</description>
	<lastBuildDate>Mon, 14 Dec 2009 01:01:24 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='amiraryani.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/3e4d933aa18ab3c0cd0eed3bed1f684a?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Amir Aryani</title>
		<link>http://amiraryani.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://amiraryani.wordpress.com/osd.xml" title="Amir Aryani" />
		<item>
		<title>Microsoft Prism</title>
		<link>http://amiraryani.wordpress.com/2009/12/14/microsoft-prism/</link>
		<comments>http://amiraryani.wordpress.com/2009/12/14/microsoft-prism/#comments</comments>
		<pubDate>Mon, 14 Dec 2009 01:01:24 +0000</pubDate>
		<dc:creator>Amir Aryani</dc:creator>
				<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://amiraryani.wordpress.com/?p=329</guid>
		<description><![CDATA[I just learned about Prism as a way for developing composite applications using WPF.
Prism as a guideline:
This guidance will help you design and build flexible client  applications using loosely coupled, independently evolvable pieces that  work together and are integrated into the overall application. This type  of application is known as a composite application.
Ref: [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amiraryani.wordpress.com&blog=3102821&post=329&subd=amiraryani&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I just learned about Prism as a way for developing composite applications using WPF.</p>
<p>Prism as a guideline:</p>
<blockquote><p>This guidance will help you design and build flexible client  applications using loosely coupled, independently evolvable pieces that  work together and are integrated into the overall application. This type  of application is known as a composite application.</p></blockquote>
<p>Ref: <a href="http://msdn.microsoft.com/en-us/library/dd458941.aspx" target="_blank">http://msdn.microsoft.com/en-us/library/dd458941.aspx</a></p>
<p>To answer the question why using Prism, refer to <a href="http://msdn.microsoft.com/en-us/library/dd490815.aspx" target="_blank">http://msdn.microsoft.com/en-us/library/dd490815.aspx</a></p>
<blockquote><p>Composite applications provide many benefits, including the following:</p></blockquote>
<blockquote>
<ul>
<li>They allow modules to be individually developed, tested,  and deployed by different individuals or sub-teams&#8230;</li>
<li>They provide a common shell composed of UI components  contributed from various modules that interact in a loosely coupled way&#8230;</li>
<li>They promote re-use and a clean separation of concerns  between the application&#8217;s horizontal capabilities&#8230;</li>
<li>They help maintain a separation of roles by allowing  different individuals or sub-teams to focus on a specific task or piece  of functionality according to their focus or expertise&#8230;</li>
</ul>
</blockquote>
<p>Other resources:</p>
<ul>
<li>Prism on CodePlex: <a href="http://www.codeplex.com/CompositeWPF" target="_blank">http://www.codeplex.com/CompositeWPF</a></li>
<li>Prism for Silverlight &#8211; An Intro to Composite Applications:<br />
<a href="http://development-guides.silverbaylabs.org/Video/Silverlight-Prism" target="_blank">http://development-guides.silverbaylabs.org/Video/Silverlight-Prism</a></li>
</ul>
Posted in Silverlight, WPF  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/amiraryani.wordpress.com/329/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/amiraryani.wordpress.com/329/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/amiraryani.wordpress.com/329/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/amiraryani.wordpress.com/329/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/amiraryani.wordpress.com/329/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/amiraryani.wordpress.com/329/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/amiraryani.wordpress.com/329/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/amiraryani.wordpress.com/329/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/amiraryani.wordpress.com/329/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/amiraryani.wordpress.com/329/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amiraryani.wordpress.com&blog=3102821&post=329&subd=amiraryani&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://amiraryani.wordpress.com/2009/12/14/microsoft-prism/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2317bf5cc09bca49a137365630f2be22?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">amir</media:title>
		</media:content>
	</item>
		<item>
		<title>Entity Framework assications (Independent vs FK)</title>
		<link>http://amiraryani.wordpress.com/2009/11/08/entity-framework-assications-independent-vs-fk/</link>
		<comments>http://amiraryani.wordpress.com/2009/11/08/entity-framework-assications-independent-vs-fk/#comments</comments>
		<pubDate>Sun, 08 Nov 2009 05:42:08 +0000</pubDate>
		<dc:creator>Amir Aryani</dc:creator>
				<category><![CDATA[Entity Framework]]></category>
		<category><![CDATA[LINQ]]></category>

		<guid isPermaLink="false">http://amiraryani.wordpress.com/?p=321</guid>
		<description><![CDATA[Entity Framework association is a different concept to FKs in the database schema.  Supporting or not supporting the Schema FKs has been a topic for debate in the community until now. Faisal Mohamood (Program Manager of Entity Framework) believes in the following prons and cons of using FKs in a model (Ref 1):

Benefits of Foreign [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amiraryani.wordpress.com&blog=3102821&post=321&subd=amiraryani&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Entity Framework association is a different concept to FKs in the database schema.  Supporting or not supporting the Schema FKs has been a topic for debate in the community until now. Faisal Mohamood (Program Manager of Entity Framework) believes in the following prons and cons of using FKs in a model (Ref 1):</p>
<blockquote>
<h3>Benefits of Foreign Keys</h3>
<ol>
<li>Keeps it simple (for the simple cases)  and allows you to deal with relationship like you deal with them in the database</li>
<li>Technically, you can update relationships without having both ends loaded/materialized. This is however in reality not always interesting since you will likely load both ends but this feature is definitely useful.</li>
</ol>
<h3>Disadvantages of Foreign Keys in the Model</h3>
<ol>
<li>It is a part of the impedance mismatch problem.</li>
<li><strong>It doesn’t allow the concepts that you would expect from relationships in objects (easily getting from one end to the other) for instance</strong>.</li>
<li>Having foreign keys as well as object references for relationship navigation presents the problem of two different artifacts representing relationships – this introduces complexity and now you have to make sure that you keep these two in sync.</li>
</ol>
</blockquote>
<p>I think the biggest disadvantage of FKs (stated in number 2) is the conflict with the object model pattern.</p>
<p>However, it seems that Microsoft decided that both sides of this discussion have their valid points. So in Entity Framework .Net 4, Fks are supported and it is up to the software architects to make their decision to just use  independent associations (.Net 3.5 SP1) or add the FKs to the model.</p>
<p>The following code snippets form ADO.Net blog illustrate the implication of using Fks as part of the model (Ref 2). In our model there are two entities <em>Product </em>and <em>Category</em>, with the association one to many where each <em>Product </em>belongs to one <em>Category.</em></p>
<p>First:  Using the independent association between Product and Category.</p>
<pre class="brush: csharp;">
public void Create_new_Product_in_existing_Category_by_reference()
{
    using (var context = new Context())
    {
        //Create a new product and relate to an existing category
        Product p = new Product
        {
            ID = 1,
            Name = &quot;Bovril&quot;,
            Category = context.Categories
                        .Single(c =&gt; c.Name == &quot;Food&quot;)
        };
        // Note: no need to add the product, because relating
        // to an existing category does that automatically.
        // Also notice the use of the Single() query operator
        // this is new to EF in .NET 4.0 too.
        context.SaveChanges();
    }
}
</pre>
<p>Second: Using the Foreign Key.</p>
<pre class="brush: csharp;">
using (var context = new Context())
{
    //Create a product and a relationship to a known category by ID
    Product p = new Product
    {
        ID = 1,
        Name = &quot;Bovril&quot;,
        CategoryID = 13
    };
    //Add the product (and create the relationship by FK value)
    context.Products.AddObject(p);
    context.SaveChanges();
}
</pre>
<p>Further Reading:</p>
<ul>
<li><a href="http://msdn.microsoft.com/en-us/library/ee373856(VS.100).aspx" target="_blank">[MSDN] Defining and Managing Relationships (Entity Framework)</a></li>
<li><a href="http://mosesofegypt.net/post/Inheritance-and-Associations-with-Entity-Framework-Part-3.aspx" target="_blank">Inheritance and Associations with Entity Framework Part 3</a></li>
</ul>
<p>References:</p>
<ol>
<li><a href="http://blogs.msdn.com/efdesign/archive/2008/10/27/foreign-keys-in-the-conceptual-and-object-models.aspx" target="_blank">[blogs.msdn.com/EFDesign]Foreign Keys in the Conceptual and Object Models</a></li>
<li><a href="http://blogs.msdn.com/efdesign/archive/2009/03/16/foreign-keys-in-the-entity-framework.aspx" target="_blank">[blogs.msdn.com/EFDesign]Foreign Keys in the Entity Framework</a></li>
</ol>
Posted in Entity Framework, LINQ  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/amiraryani.wordpress.com/321/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/amiraryani.wordpress.com/321/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/amiraryani.wordpress.com/321/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/amiraryani.wordpress.com/321/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/amiraryani.wordpress.com/321/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/amiraryani.wordpress.com/321/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/amiraryani.wordpress.com/321/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/amiraryani.wordpress.com/321/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/amiraryani.wordpress.com/321/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/amiraryani.wordpress.com/321/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amiraryani.wordpress.com&blog=3102821&post=321&subd=amiraryani&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://amiraryani.wordpress.com/2009/11/08/entity-framework-assications-independent-vs-fk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2317bf5cc09bca49a137365630f2be22?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">amir</media:title>
		</media:content>
	</item>
		<item>
		<title>White space (blank line) top of the ASP.Net Menu in IE8</title>
		<link>http://amiraryani.wordpress.com/2009/09/02/white-space-blank-line-top-of-the-asp-net-menu-in-ie8/</link>
		<comments>http://amiraryani.wordpress.com/2009/09/02/white-space-blank-line-top-of-the-asp-net-menu-in-ie8/#comments</comments>
		<pubDate>Wed, 02 Sep 2009 01:22:07 +0000</pubDate>
		<dc:creator>Amir Aryani</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[ASP.Net Menu]]></category>
		<category><![CDATA[IE8]]></category>
		<category><![CDATA[SkipLinkText]]></category>

		<guid isPermaLink="false">http://amiraryani.wordpress.com/?p=315</guid>
		<description><![CDATA[Following my previous post about applying a hot fox for ASP.Net menu control, I discovered that the z-index is not the only issue to fix. ASP.Net control when it gets rendered in IE8 shows a gap on top of it like a blank line or a white space.  Sakya found out and explains on his [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amiraryani.wordpress.com&blog=3102821&post=315&subd=amiraryani&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Following <a href="http://amiraryani.wordpress.com/2009/08/24/asp-net-menu-does-not-work-in-ie8/" target="_blank">my previous post</a> about applying a hot fox for ASP.Net menu control, I discovered that the z-index is not the only issue to fix. ASP.Net control when it gets rendered in IE8 shows a gap on top of it like a blank line or a white space.  <a href="http://blogs.iis.net/sakyad/archive/2009/04/11/asp-net-menu-control-getting-padded-with-white-space-on-ie8.aspx" target="_blank">Sakya </a>found out and explains on his blog that it is the result of <strong>SkipLinkText</strong> which is not rendered in IE7 but IE8 render it.</p>
<p>The following code snippet shows how to set <strong>SkipLinkText </strong>to blank.</p>
<pre class="brush: xml;">
&lt;asp :Menu ID=&quot;Menu1&quot;  runat=&quot;server&quot;
     DataSourceID=&quot;SiteMapDataSource1&quot;
     SkipLinkText=&quot;&quot;&gt;
&lt;/asp&gt;
</pre>
<p>For more information refer to <a href="http://blogs.iis.net/sakyad/archive/2009/04/11/asp-net-menu-control-getting-padded-with-white-space-on-ie8.aspx" target="_blank">http://blogs.iis.net/sakyad/archive/2009/04/11/asp-net-menu-control-getting-padded-with-white-space-on-ie8.aspx</a>.</p>
Posted in ASP.NET  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/amiraryani.wordpress.com/315/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/amiraryani.wordpress.com/315/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/amiraryani.wordpress.com/315/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/amiraryani.wordpress.com/315/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/amiraryani.wordpress.com/315/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/amiraryani.wordpress.com/315/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/amiraryani.wordpress.com/315/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/amiraryani.wordpress.com/315/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/amiraryani.wordpress.com/315/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/amiraryani.wordpress.com/315/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amiraryani.wordpress.com&blog=3102821&post=315&subd=amiraryani&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://amiraryani.wordpress.com/2009/09/02/white-space-blank-line-top-of-the-asp-net-menu-in-ie8/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2317bf5cc09bca49a137365630f2be22?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">amir</media:title>
		</media:content>
	</item>
		<item>
		<title>Make the ASP:Login control centre</title>
		<link>http://amiraryani.wordpress.com/2009/08/26/make-the-asplogin-control-centre/</link>
		<comments>http://amiraryani.wordpress.com/2009/08/26/make-the-asplogin-control-centre/#comments</comments>
		<pubDate>Wed, 26 Aug 2009 07:18:56 +0000</pubDate>
		<dc:creator>Amir Aryani</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Align center]]></category>
		<category><![CDATA[Login control]]></category>
		<category><![CDATA[margin]]></category>

		<guid isPermaLink="false">http://amiraryani.wordpress.com/?p=313</guid>
		<description><![CDATA[Following my previous post you cannot use &#8220;p&#8221; or &#8220;div&#8221; tags to align a ASP:Login control to the center of the page. So to get this done, you need to set the margin property of the control to &#8220;auto&#8221;.

&#60;body&#62;
    &#60;form id=&#34;form1&#34; runat=&#34;server&#34;&#62;
&#60;div&#62;
        &#60;asp :login runat=&#34;server&#34; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amiraryani.wordpress.com&blog=3102821&post=313&subd=amiraryani&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Following my <a href="http://amiraryani.wordpress.com/2009/08/26/align-a-table-in-the-middle-of-an-html-xhtml-page/" target="_self">previous post</a> you cannot use &#8220;p&#8221; or &#8220;div&#8221; tags to align a ASP:Login control to the center of the page. So to get this done, you need to set the <em>margin</em> property of the control to &#8220;auto&#8221;.</p>
<pre class="brush: csharp;">
&lt;body&gt;
    &lt;form id=&quot;form1&quot; runat=&quot;server&quot;&gt;
&lt;div&gt;
        &lt;asp :login runat=&quot;server&quot; Style=&quot;margin:auto&quot;&gt;&lt;/asp&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/body&gt;
</pre>
Posted in ASP.NET  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/amiraryani.wordpress.com/313/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/amiraryani.wordpress.com/313/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/amiraryani.wordpress.com/313/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/amiraryani.wordpress.com/313/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/amiraryani.wordpress.com/313/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/amiraryani.wordpress.com/313/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/amiraryani.wordpress.com/313/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/amiraryani.wordpress.com/313/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/amiraryani.wordpress.com/313/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/amiraryani.wordpress.com/313/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amiraryani.wordpress.com&blog=3102821&post=313&subd=amiraryani&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://amiraryani.wordpress.com/2009/08/26/make-the-asplogin-control-centre/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2317bf5cc09bca49a137365630f2be22?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">amir</media:title>
		</media:content>
	</item>
		<item>
		<title>Align a table in the middle of an HTML &#124; XHTML page</title>
		<link>http://amiraryani.wordpress.com/2009/08/26/align-a-table-in-the-middle-of-an-html-xhtml-page/</link>
		<comments>http://amiraryani.wordpress.com/2009/08/26/align-a-table-in-the-middle-of-an-html-xhtml-page/#comments</comments>
		<pubDate>Wed, 26 Aug 2009 06:48:44 +0000</pubDate>
		<dc:creator>Amir Aryani</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[align table]]></category>
		<category><![CDATA[div]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://amiraryani.wordpress.com/?p=309</guid>
		<description><![CDATA[In the past it was common to align a table in the middle of a HTML page using the following code:

&#60;div align=&#34;center&#34;&#62;
&#60;table&#62;
&#60;tr&#62;
&#60;td&#62;
        Test String&#60;/td&#62;
&#60;/tr&#62;
&#60;/table&#62;
&#60;/div&#62;

However, this is no longer working as in the new XHTML standards &#8220;align&#8221; is not a valid attribute of
. So a better solution is to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amiraryani.wordpress.com&blog=3102821&post=309&subd=amiraryani&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>In the past it was common to align a table in the middle of a HTML page using the following code:</p>
<pre class="brush: xml;">
&lt;div align=&quot;center&quot;&gt;
&lt;table&gt;
&lt;tr&gt;
&lt;td&gt;
        Test String&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;/div&gt;
</pre>
<p>However, this is no longer working as in the new XHTML standards &#8220;align&#8221; is not a valid attribute of
<div>. So a better solution is to set the margin of the table to &#8220;auto&#8221;. You can delete the
<div> as it is no longer needed for this purpose:</p>
<pre class="brush: xml;">
  &lt;table style=&quot;margin: auto;&quot;&gt;
    &lt;tr&gt;
      &lt;td&gt;
        Test String
      &lt;/td&gt;
    &lt;/tr&gt;
  &lt;/table&gt;
</pre>
</div>
</div>
Posted in ASP.NET  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/amiraryani.wordpress.com/309/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/amiraryani.wordpress.com/309/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/amiraryani.wordpress.com/309/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/amiraryani.wordpress.com/309/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/amiraryani.wordpress.com/309/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/amiraryani.wordpress.com/309/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/amiraryani.wordpress.com/309/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/amiraryani.wordpress.com/309/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/amiraryani.wordpress.com/309/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/amiraryani.wordpress.com/309/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amiraryani.wordpress.com&blog=3102821&post=309&subd=amiraryani&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://amiraryani.wordpress.com/2009/08/26/align-a-table-in-the-middle-of-an-html-xhtml-page/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2317bf5cc09bca49a137365630f2be22?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">amir</media:title>
		</media:content>
	</item>
		<item>
		<title>ASP.Net menu does not work in IE8</title>
		<link>http://amiraryani.wordpress.com/2009/08/24/asp-net-menu-does-not-work-in-ie8/</link>
		<comments>http://amiraryani.wordpress.com/2009/08/24/asp-net-menu-does-not-work-in-ie8/#comments</comments>
		<pubDate>Mon, 24 Aug 2009 02:47:36 +0000</pubDate>
		<dc:creator>Amir Aryani</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[ASP.Net HotFix]]></category>
		<category><![CDATA[ASP.Net Menu]]></category>
		<category><![CDATA[Dynamic Menu]]></category>
		<category><![CDATA[IE8]]></category>

		<guid isPermaLink="false">http://amiraryani.wordpress.com/?p=306</guid>
		<description><![CDATA[The first problem which I found with the ASP.Net applications runing on IE8 was the dynamic menu. It does not invoke correctly as the default value for Z-Index is no longer valid for IE8. The problem and the work around it, is explained in
http://support.microsoft.com/kb/962351
In addition, the following list of issues and hotfixes related to ASP.Net [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amiraryani.wordpress.com&blog=3102821&post=306&subd=amiraryani&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>The first problem which I found with the ASP.Net applications runing on IE8 was the dynamic menu. It does not invoke correctly as the default value for Z-Index is no longer valid for IE8. The problem and the work around it, is explained in</p>
<p><a href="http://support.microsoft.com/kb/962351"><strong>http://support.microsoft.com/kb/962351</strong></a></p>
<p>In addition, the following list of issues and hotfixes related to ASP.Net 2 are important to review:</p>
<blockquote><p><a href="http://support.microsoft.com/kb/961847/">961847</a> FIX: Error message when you view a page in design mode after you recompile a .NET Framework 3.5 Service Pack 1-based project: &#8220;Error creating control &#8211; &#8216;ControlInstanceName [text]&#8216; could not be set on property &#8216;PropertyName&#8217;&#8221;</p>
<p><a href="http://support.microsoft.com/kb/961864/">961864</a> FIX: Web clients may have several problems when you access an ASP.NET 2.0 AJAX-enabled Web site</p>
<p><a href="http://support.microsoft.com/kb/961884/">961884</a> FIX: You experience very slow performance on an initial request to an ASP.NET Web site after you change the App_Code folder, the bin folder, or the Global.asax file</p>
<p><a href="http://support.microsoft.com/kb/962351/">962351</a> FIX: The pop-out menus are not displayed when you use Internet Explorer 8.0 in Standards mode to view an ASP.NET Web page that has dynamic menus</p>
<p><a href="http://support.microsoft.com/kb/961902/">961902</a> FIX: Error message when you compile an ASP.NET project that contains many application resource files: &#8220;A first chance exception of type &#8216;System.ArgumentException&#8217; occurred in mscorlib.dll&#8221;</p>
<p><a href="http://support.microsoft.com/kb/968392/">968392</a> Error message and the hyperlink control is not rendered if the ImageUrl property is set in Visual Studio 2005 or Visual Studio 2008 after you install .NET Framework 2.0 Service Pack 2 or .NET Framework 3.5 Service Pack 1:&#8221;Object reference not set to an instance of an object&#8221;</p></blockquote>
<p>Reference: <a href="http://support.microsoft.com/?id=969612">http://support.microsoft.com/?id=969612</a></p>
<p>Other blog posts related to this issue:</p>
<ul>
<li><a href="http://weblogs.asp.net/bleroy/archive/2009/03/23/asp-menu-fix-for-ie8-problem-available.aspx">http://weblogs.asp.net/bleroy/archive/2009/03/23/asp-menu-fix-for-ie8-problem-available.aspx</a></li>
<li><a href="http://blogs.msdn.com/dougste/archive/2009/03/02/some-recent-asp-net-fixes-march-2009.aspx">http://blogs.msdn.com/dougste/archive/2009/03/02/some-recent-asp-net-fixes-march-2009.aspx</a></li>
</ul>
Posted in ASP.NET  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/amiraryani.wordpress.com/306/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/amiraryani.wordpress.com/306/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/amiraryani.wordpress.com/306/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/amiraryani.wordpress.com/306/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/amiraryani.wordpress.com/306/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/amiraryani.wordpress.com/306/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/amiraryani.wordpress.com/306/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/amiraryani.wordpress.com/306/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/amiraryani.wordpress.com/306/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/amiraryani.wordpress.com/306/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amiraryani.wordpress.com&blog=3102821&post=306&subd=amiraryani&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://amiraryani.wordpress.com/2009/08/24/asp-net-menu-does-not-work-in-ie8/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2317bf5cc09bca49a137365630f2be22?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">amir</media:title>
		</media:content>
	</item>
		<item>
		<title>Visual Studio Setup (deployment) project</title>
		<link>http://amiraryani.wordpress.com/2009/08/07/visual-studio-setup-deployment-project/</link>
		<comments>http://amiraryani.wordpress.com/2009/08/07/visual-studio-setup-deployment-project/#comments</comments>
		<pubDate>Fri, 07 Aug 2009 07:05:20 +0000</pubDate>
		<dc:creator>Amir Aryani</dc:creator>
				<category><![CDATA[.Net CLR]]></category>
		<category><![CDATA[IT Support]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Create Shortcut]]></category>
		<category><![CDATA[Deployment]]></category>
		<category><![CDATA[Register COM]]></category>
		<category><![CDATA[Setup project]]></category>

		<guid isPermaLink="false">http://amiraryani.wordpress.com/?p=304</guid>
		<description><![CDATA[Reading the Microsoft support article about using the Setup project in Visual Studio:
In order to create a Setup deployment project :


Start a new project by doing one of the following:

On the File menu, point to New, and then click Project.
-or-
If you have an project open that you would like to create a setup package for, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amiraryani.wordpress.com&blog=3102821&post=304&subd=amiraryani&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Reading the <a href="http://support.microsoft.com/kb/307353" target="_blank">Microsoft support article</a> about using the Setup project in Visual Studio:</p>
<p>In order to create a Setup deployment project :</p>
<blockquote>
<ol>
<li>Start a new project by doing one of the following:
<ul>
<li>On the <strong>File</strong> menu, point to <strong>New</strong>, and then click <strong>Project</strong>.
<p>-or-</li>
<li>If you have an project open that you would like to create a setup package for, right-click <strong>Solution <var>MyProject</var></strong> (where the name of your project is <var>MyProject</var>) in the Solution Explorer, point to <strong>Add</strong>, and then click <strong>New Project</strong>.</li>
</ul>
</li>
<li>In the <strong>New Project</strong> dialog box, select <strong>Setup and Deployment Projects</strong> in the Project Type pane, and then select the type of setup that you want in the Templates pane.
<p>The project is added to the Solution Explorer, and then the <strong>File System Editor</strong> opens.</li>
<li>In the <strong>Properties</strong> dialog box, select the <strong>ProductName</strong> property, and then type the name of your product.</li>
</ol>
</blockquote>
<p>And to add files to the Setup project:</p>
<blockquote>
<ol>
<li>In the <strong>File System Editor</strong>, select the <strong>Application Folder</strong> node.</li>
<li>Right-click the <strong>Application</strong> folder, and then on the <strong>Action</strong> menu, click <strong>Add</strong>, <strong>File</strong>. In the <strong>Add Files</strong> dialog box, browse to select any files that you need to add to your application.
<p><strong>NOTE</strong>: If you already have an application project in your solution, you can add the project outputs by selecting <strong>Project Outputs</strong> instead of <strong>File</strong>.</li>
<li>To add an existing merge module to your setup package (this is not possible for a Cab project), right-click the name of your setup package in the Solution Explorer. Click <strong>Add</strong>, and then click <strong>Merge Module</strong>. In the <strong>Add Modules</strong> dialog box, browse to select any merge modules that you need to add to your application.</li>
</ol>
</blockquote>
<p>To create a shortcut for the installed program:</p>
<blockquote>
<ol>
<li>Open the File System Editor: from the <strong>View</strong> menu, point to <strong>Editor</strong>, and then click <strong>File System</strong>.</li>
<li>Open the application folder that contains the file that you 				want to create a shortcut for.</li>
<li>Right-click the file that you want to create a shortcut 				to.</li>
<li>Click <strong>Create Shortcut</strong>.</li>
<li>A shortcut will be created in the same folder as the 				original file.</li>
<li>Drag the shortcut to the desired folder. For example, if 				you want to create a shortcut in your <strong>Program</strong> menu, drag the shortcut to the <strong>Programs</strong> menu folder; if you want to create a shortcut on the <strong>Start</strong> menu, drag the shortcut to the <strong>Start</strong> menu folder. The folder location of the shortcut can also be 				changed through the <strong>folder</strong> field of the Properties Window.</li>
</ol>
</blockquote>
<p>To register COM objects as part of the installation:</p>
<blockquote>
<li>Add a COM object to your Visual Studio deployment project.</li>
<li>In the Solution Explorer, right-click the module that you just added, and then click <strong>Properties</strong>.
<p><strong>NOTE</strong>: The Properties window contains a table with two columns and <var>x</var> number of rows (the number of rows depends on the project). The left column lists the specific properties. The right column is explained in step 4.</li>
<li>Go to Properties for this module (located by default in the upper-right corner of the .NET Deployment project), and then click <strong>Registry property</strong>.
<p><strong>NOTE</strong>: The Registry property specifies whether a file, assembly, or project output group should be registered on a target computer during installation.</li>
<li>There is a list box in the right column of the Registry property, which displays several options for you to choose from. Note the following details for an explanation of these options:</li>
<ul>
<li>For assembly, registration is not normally required, and therefore the default is <strong>DoNotRegister</strong> (this means that the item will not be registered during the installation).</li>
<li>For a COM module, you have the options of <strong>COM</strong>, <strong>COMRelativePath</strong>, and <strong>COMSelfReg</strong>. Any one of those three options will register the COM module during the installation.
<p>Note the following details about each choice:</li>
<li><strong>COM</strong>: The module will be registered as a COM object by the Windows Installer engine. The deployment project will update the Class table, ProgID table, and other tables in the Registry Tables group of the corresponding .msi file. This is the recommended way to register a COM module.</li>
<li><strong>COMRelativePath</strong>: The module will be registered as an isolated COM object by the Windows Installer engine. Note that this module will be used only by the application that the module is installed with.</li>
<li><strong>COMSelfReg</strong>: The installer calls the <strong>DllRegisterServer</strong> function of that module at the time that you install the module and the <strong>DllUnregisterServer</strong> function at the time that you uninstall the module. The deployment project will update the SelfReg table of the corresponding .msi file. It is not recommended that the installation package use self-registration. Instead, the installation package should register modules by authoring one or more of the other tables provided by the installer for this purpose (that is, select the <strong>COM</strong> or <strong>COMRelativePath</strong> options). Many of the benefits of having a central installer service are lost with self-registration, because self-registration routines tend to hide critical configuration information.</li>
</ul>
</blockquote>
<p>Referemces:</p>
<ol>
<li><a href="http://support.microsoft.com/kb/307353" target="_blank">http://support.microsoft.com/kb/307353</a></li>
<li><a href="http://support.microsoft.com/kb/307358" target="_blank">http://support.microsoft.com/kb/307358</a></li>
<li><a href="http://support.microsoft.com/kb/307367" target="_blank">http://support.microsoft.com/kb/307367</a></li>
</ol>
<blockquote></blockquote>
Posted in .Net CLR, IT Support, Visual Studio  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/amiraryani.wordpress.com/304/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/amiraryani.wordpress.com/304/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/amiraryani.wordpress.com/304/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/amiraryani.wordpress.com/304/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/amiraryani.wordpress.com/304/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/amiraryani.wordpress.com/304/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/amiraryani.wordpress.com/304/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/amiraryani.wordpress.com/304/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/amiraryani.wordpress.com/304/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/amiraryani.wordpress.com/304/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amiraryani.wordpress.com&blog=3102821&post=304&subd=amiraryani&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://amiraryani.wordpress.com/2009/08/07/visual-studio-setup-deployment-project/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2317bf5cc09bca49a137365630f2be22?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">amir</media:title>
		</media:content>
	</item>
		<item>
		<title>States pane not visible in Blend 3</title>
		<link>http://amiraryani.wordpress.com/2009/08/02/states-pane-not-visible-in-blend-3/</link>
		<comments>http://amiraryani.wordpress.com/2009/08/02/states-pane-not-visible-in-blend-3/#comments</comments>
		<pubDate>Sun, 02 Aug 2009 07:03:45 +0000</pubDate>
		<dc:creator>Amir Aryani</dc:creator>
				<category><![CDATA[WPF]]></category>
		<category><![CDATA[Expression Blend]]></category>
		<category><![CDATA[States Pane]]></category>
		<category><![CDATA[Visual State Manager]]></category>
		<category><![CDATA[WPFToolkit]]></category>

		<guid isPermaLink="false">http://amiraryani.wordpress.com/?p=300</guid>
		<description><![CDATA[When I started to follow some of the video tuturial for Expression Blend 3, I noticed that States pane is not available when I work on the WPF project; however, it is there when I create a Silverlight project. Apparetly the state manager is part of WPFToolkit and the work arround this issue is explained [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amiraryani.wordpress.com&blog=3102821&post=300&subd=amiraryani&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>When I started to follow some of the video tuturial for Expression Blend 3, I noticed that States pane is not available when I work on the WPF project; however, it is there when I create a Silverlight project. Apparetly the state manager is part of WPFToolkit and the work arround this issue is explained in  <a href="http://http://blogs.msdn.com/expression/archive/2008/10/30/blend-2-sp1-wpf-toolkit-visual-state-manager-for-wpf.aspx" target="_blank">team blog of the Expression Blend</a>:</p>
<blockquote><p>Here are the steps you need to follow to get to the VSM-for-WPF goodness:</p>
<ol>
<li>Install the WPF Toolkit from http://www.codeplex.com/wpf/Release/ProjectReleases.aspx?ReleaseId=15598</li>
<li>Create the following registry value and make it non-zero. The value should be of type DWORD. Or run the appropriate .REG file attached to this post (or by clicking here).</li>
<li>32 bit OS : HKLM/Software/Microsoft/Expression/Blend/EnableVSM</li>
<li>64 bit OS : HKLM/Software/Wow6432Node/Microsoft/Expression/Blend/EnableVSM</li>
<li>If Blend was running during the previous step then restart it.</li>
<li>Create a new WPF project.</li>
<li>Add %Program Files%\WPF\WPF Toolkit\&#8230;\WPFToolkit.dll to the References folder (Right-click the References node in Project, then click Add Reference…).</li>
<li>Close and reopen Window1.xaml. The States pane will now appear for the project.</li>
</ol>
</blockquote>
<p>Reference: <a href="http://blogs.msdn.com/expression/archive/2008/10/30/blend-2-sp1-wpf-toolkit-visual-state-manager-for-wpf.aspx" target="_blank">http://blogs.msdn.com/expression/archive/2008/10/30/blend-2-sp1-wpf-toolkit-visual-state-manager-for-wpf.aspx</a></p>
Posted in WPF  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/amiraryani.wordpress.com/300/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/amiraryani.wordpress.com/300/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/amiraryani.wordpress.com/300/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/amiraryani.wordpress.com/300/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/amiraryani.wordpress.com/300/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/amiraryani.wordpress.com/300/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/amiraryani.wordpress.com/300/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/amiraryani.wordpress.com/300/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/amiraryani.wordpress.com/300/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/amiraryani.wordpress.com/300/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amiraryani.wordpress.com&blog=3102821&post=300&subd=amiraryani&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://amiraryani.wordpress.com/2009/08/02/states-pane-not-visible-in-blend-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2317bf5cc09bca49a137365630f2be22?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">amir</media:title>
		</media:content>
	</item>
		<item>
		<title>Tutorials to ceate a custom button in WPF / XAML</title>
		<link>http://amiraryani.wordpress.com/2009/08/01/tutorials-to-ceate-a-custom-button-in-wpf-xaml/</link>
		<comments>http://amiraryani.wordpress.com/2009/08/01/tutorials-to-ceate-a-custom-button-in-wpf-xaml/#comments</comments>
		<pubDate>Sat, 01 Aug 2009 08:24:22 +0000</pubDate>
		<dc:creator>Amir Aryani</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Custom Control]]></category>
		<category><![CDATA[Expression Blend]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[WPF]]></category>
		<category><![CDATA[XAML]]></category>

		<guid isPermaLink="false">http://amiraryani.wordpress.com/?p=296</guid>
		<description><![CDATA[I found the following articles very good well explained walkthrough for creating a custom button in WPF or Silverlight:

Walkthrough: Create a Button by Using XAML
Walkthrough: Create a Button by Using Microsoft Expression Blend

Posted in Uncategorized       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amiraryani.wordpress.com&blog=3102821&post=296&subd=amiraryani&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I found the following articles very good well explained walkthrough for creating a custom button in WPF or Silverlight:</p>
<ul>
<li><a href="http://msdn.microsoft.com/en-us/library/bb613545.aspx" target="_blank">Walkthrough: Create a Button by Using XAML</a></li>
<li><a href="http://msdn.microsoft.com/en-us/library/bb613598.aspx" target="_blank">Walkthrough: Create a Button by Using Microsoft Expression Blend</a></li>
</ul>
Posted in Uncategorized  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/amiraryani.wordpress.com/296/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/amiraryani.wordpress.com/296/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/amiraryani.wordpress.com/296/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/amiraryani.wordpress.com/296/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/amiraryani.wordpress.com/296/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/amiraryani.wordpress.com/296/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/amiraryani.wordpress.com/296/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/amiraryani.wordpress.com/296/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/amiraryani.wordpress.com/296/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/amiraryani.wordpress.com/296/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amiraryani.wordpress.com&blog=3102821&post=296&subd=amiraryani&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://amiraryani.wordpress.com/2009/08/01/tutorials-to-ceate-a-custom-button-in-wpf-xaml/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2317bf5cc09bca49a137365630f2be22?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">amir</media:title>
		</media:content>
	</item>
		<item>
		<title>Static and Dynamic XAML Resources</title>
		<link>http://amiraryani.wordpress.com/2009/07/22/static-and-dynamic-xaml-resources/</link>
		<comments>http://amiraryani.wordpress.com/2009/07/22/static-and-dynamic-xaml-resources/#comments</comments>
		<pubDate>Wed, 22 Jul 2009 03:44:35 +0000</pubDate>
		<dc:creator>Amir Aryani</dc:creator>
				<category><![CDATA[WPF]]></category>
		<category><![CDATA[Resource]]></category>
		<category><![CDATA[STYLE]]></category>
		<category><![CDATA[XAML]]></category>

		<guid isPermaLink="false">http://amiraryani.wordpress.com/?p=293</guid>
		<description><![CDATA[To assign a style to a control in WPF (or Silverlight) you can use Dynamic or Static markup extension. According to MDSN Article the differences are:
The StaticResource Markup Extension processes a key by looking up the value for that key in all available resource dictionaries. This happens during loading, which is the point in time [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amiraryani.wordpress.com&blog=3102821&post=293&subd=amiraryani&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>To assign a style to a control in WPF (or Silverlight) you can use Dynamic or Static markup extension. According to <a href="http://msdn.microsoft.com/en-us/library/ms750613.aspx" target="_blank">MDSN Article</a> the differences are:</p>
<blockquote><p>The <span><a id="ctl00_MTContentSelector1_mainContentContainer_ctl99" href="http://msdn.microsoft.com/en-us/library/ms750950.aspx">StaticResource Markup Extension</a></span> processes a key by looking up the value for that key in all available resource dictionaries. This happens during loading, which is the point in time when the loading process needs to assign the property value that takes the static resource reference. The <span><a id="ctl00_MTContentSelector1_mainContentContainer_ctl100" href="http://msdn.microsoft.com/en-us/library/ms748942.aspx">DynamicResource Markup Extension</a></span> instead processes a key by creating an expression, and that expression remains unevaluated until the application is actually run, at which time the expression is evaluated and provides a value.</p></blockquote>
Posted in WPF  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/amiraryani.wordpress.com/293/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/amiraryani.wordpress.com/293/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/amiraryani.wordpress.com/293/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/amiraryani.wordpress.com/293/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/amiraryani.wordpress.com/293/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/amiraryani.wordpress.com/293/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/amiraryani.wordpress.com/293/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/amiraryani.wordpress.com/293/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/amiraryani.wordpress.com/293/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/amiraryani.wordpress.com/293/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amiraryani.wordpress.com&blog=3102821&post=293&subd=amiraryani&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://amiraryani.wordpress.com/2009/07/22/static-and-dynamic-xaml-resources/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2317bf5cc09bca49a137365630f2be22?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">amir</media:title>
		</media:content>
	</item>
	</channel>
</rss>