<?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: Silverlight usercontrol inheritance</title>
	<atom:link href="http://www.lab101.be/2008/07/silverlight-usercontrol-inheritance/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.lab101.be/2008/07/silverlight-usercontrol-inheritance/</link>
	<description>zuppamans hangout</description>
	<pubDate>Fri, 10 Sep 2010 13:52:10 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Silverlight: inherit a generic class from UserControl at Avivo Tech Blog</title>
		<link>http://www.lab101.be/2008/07/silverlight-usercontrol-inheritance/comment-page-1/#comment-1080</link>
		<dc:creator>Silverlight: inherit a generic class from UserControl at Avivo Tech Blog</dc:creator>
		<pubDate>Mon, 30 Nov 2009 17:57:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.lab101.be/v3.0/?p=1#comment-1080</guid>
		<description>[...] cannot be written directly in xaml? There is a workaround: 1. Use a wrapper, described here 2. Create a new non-generic class, like in this sample:  xaml &lt;v:MyViewBase [...]</description>
		<content:encoded><![CDATA[<p>[...] cannot be written directly in xaml? There is a workaround: 1. Use a wrapper, described here 2. Create a new non-generic class, like in this sample:  xaml &lt;v:MyViewBase [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SLMaster</title>
		<link>http://www.lab101.be/2008/07/silverlight-usercontrol-inheritance/comment-page-1/#comment-833</link>
		<dc:creator>SLMaster</dc:creator>
		<pubDate>Thu, 05 Nov 2009 15:01:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.lab101.be/v3.0/?p=1#comment-833</guid>
		<description>Yes, Blend 3 also cannot display abstract classes.
But don't bother with it, just remove the abstract keyword:)</description>
		<content:encoded><![CDATA[<p>Yes, Blend 3 also cannot display abstract classes.<br />
But don&#8217;t bother with it, just remove the abstract keyword:)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kris Meeusen</title>
		<link>http://www.lab101.be/2008/07/silverlight-usercontrol-inheritance/comment-page-1/#comment-767</link>
		<dc:creator>Kris Meeusen</dc:creator>
		<pubDate>Sun, 01 Nov 2009 10:41:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.lab101.be/v3.0/?p=1#comment-767</guid>
		<description>Hey Bastien,


Thx for the solution.
It's an older blog post so I didn't check if the problems still exists in Blend 3</description>
		<content:encoded><![CDATA[<p>Hey Bastien,</p>
<p>Thx for the solution.<br />
It&#8217;s an older blog post so I didn&#8217;t check if the problems still exists in Blend 3</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bastien BESSON</title>
		<link>http://www.lab101.be/2008/07/silverlight-usercontrol-inheritance/comment-page-1/#comment-765</link>
		<dc:creator>Bastien BESSON</dc:creator>
		<pubDate>Sat, 31 Oct 2009 19:35:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.lab101.be/v3.0/?p=1#comment-765</guid>
		<description>I think there is a better option now : 

This solution take in account that your base class is in another project ( let say your Framework ), but of course work also if in the same project, with the same processus ( it's just to show that it is possible too ).

Home.Xaml :

For adding the possibility of using the base class, add a "xmlns" to the property of your UserControl, Intellisense will give you automatically all the namespace you have in your project and dll, just choose the one where your HomeBase is, and you'll have something like :

xmlns="clr-namespace:Framework;assembly=Framework"

Then add it a name to use it in the Xaml File :

xmlns:Base="clr-namespace:Framework;assembly=Framework"

Finally change your  to something like  where HomeBase is your base class and Base the name you gave to your xmlns reference.

Here is what you should have =&gt;




Home.Xaml.cs :

namespace SilverlightApplication
{
    public partial class Home : HomeBase
    {

    ...

    }

}

  And it's done ;)

Rmk : If you use Expression Blend 3, be aware that using abstract class as Base will make Blend unable to display your Xaml file ( even if all works fine .. ), and you need to create a default Constructor without parameter too or again, Blend won't display your xaml file.</description>
		<content:encoded><![CDATA[<p>I think there is a better option now : </p>
<p>This solution take in account that your base class is in another project ( let say your Framework ), but of course work also if in the same project, with the same processus ( it&#8217;s just to show that it is possible too ).</p>
<p>Home.Xaml :</p>
<p>For adding the possibility of using the base class, add a &#8220;xmlns&#8221; to the property of your UserControl, Intellisense will give you automatically all the namespace you have in your project and dll, just choose the one where your HomeBase is, and you&#8217;ll have something like :</p>
<p>xmlns=&#8221;clr-namespace:Framework;assembly=Framework&#8221;</p>
<p>Then add it a name to use it in the Xaml File :</p>
<p>xmlns:Base=&#8221;clr-namespace:Framework;assembly=Framework&#8221;</p>
<p>Finally change your  to something like  where HomeBase is your base class and Base the name you gave to your xmlns reference.</p>
<p>Here is what you should have =&gt;</p>
<p>Home.Xaml.cs :</p>
<p>namespace SilverlightApplication<br />
{<br />
    public partial class Home : HomeBase<br />
    {</p>
<p>    &#8230;</p>
<p>    }</p>
<p>}</p>
<p>  And it&#8217;s done <img src='http://www.lab101.be/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Rmk : If you use Expression Blend 3, be aware that using abstract class as Base will make Blend unable to display your Xaml file ( even if all works fine .. ), and you need to create a default Constructor without parameter too or again, Blend won&#8217;t display your xaml file.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason</title>
		<link>http://www.lab101.be/2008/07/silverlight-usercontrol-inheritance/comment-page-1/#comment-750</link>
		<dc:creator>Jason</dc:creator>
		<pubDate>Mon, 26 Oct 2009 22:32:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.lab101.be/v3.0/?p=1#comment-750</guid>
		<description>Very nice, indeed, thanks.</description>
		<content:encoded><![CDATA[<p>Very nice, indeed, thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Raghuraman</title>
		<link>http://www.lab101.be/2008/07/silverlight-usercontrol-inheritance/comment-page-1/#comment-195</link>
		<dc:creator>Raghuraman</dc:creator>
		<pubDate>Wed, 29 Jul 2009 13:16:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.lab101.be/v3.0/?p=1#comment-195</guid>
		<description>Don't know why nobody has yet commented here.

Thanks for a Nice Write UP !!!</description>
		<content:encoded><![CDATA[<p>Don&#8217;t know why nobody has yet commented here.</p>
<p>Thanks for a Nice Write UP !!!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
