Programming with .NET - Generalhttp://forums.silverlight.net//17.aspx/1?Programming+with+NET+GeneralGeneral discussions around authoring Silverlight .NET applications.Mon, 01 Jan 0001 00:00:00 -05001740328http://forums.silverlight.net//p/12448/40328.aspx/1?Silverlight+User+Control+InheritanceSilverlight User Control Inheritance <p>I am writing a custom control.<br> This control and the others to follow, must inherit from a baseclass that I have defined some generic functions in.</p> <p>Every time I make changes to the code or xaml, the .g.cs partial class gets regenerated, but it keeps putting UserControl as the base.<br> This means that it does not compile anymore...</p> <p>Can I spesify somewhere for the code generator what base class I want it to use for the .g.cs partial class?</p> 2008-03-24T07:19:49-04:0040333http://forums.silverlight.net//p/12448/40333.aspx/1?Re+Silverlight+User+Control+InheritanceRe: Silverlight User Control Inheritance <p>Hello caperaven,</p> <p>Please try the following steps.<br> <br> <b>1. Create SL project.</b><br> </p> <p><b>2. MyUserControlBase.cs</b><br> </p> <p><b>3. Inherits from UserControl</b><br> <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; namespace SL2Test {<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public class MyUserControlBase : UserControl {<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public string DoSomething() {<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return &quot;Ahh! bad attemps!&quot;;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br> <br> <br> <b>4. In Page.xaml.cs</b><br> <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; namespace SL2Test {<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public partial class Page : MyUserControlBase {<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public Page() {<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; InitializeComponent();<br> <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br> <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br> <br> <br> <b>5. In Page.xaml,</b><br> <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;<b>MyUserControlBase</b> x:Class=&quot;SL2Test.Page&quot;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xmlns=&quot;http://schemas.microsoft.com/client/2007&quot;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xmlns:x=&quot;http://schemas.microsoft.com/winfx/2006/xaml&quot;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Width=&quot;400&quot; Height=&quot;300&quot;&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Canvas Width=&quot;400&quot; Height=&quot;300&quot; Background=&quot;Red&quot;&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/Canvas&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/<b>MyUserControlBase</b>&gt;<br> <br> <b>6.[assembly: XmlnsDefinition(&quot;http://schemas.microsoft.com/client/2007&quot;, &quot;YourNamespace&quot;)]</b> </p> <p>In the class library project's AssemblyInfo.cs file, add this:<br> <br> [assembly: XmlnsDefinition(&quot;http://schemas.microsoft.com/client/2007&quot;, &quot;YourNamespace&quot;)]<br> <br> Now after you add reference to this assembly in your main project, you can use any classes in this namespace in your XAML files. <br> </p> <p>&nbsp;</p> 2008-03-24T07:28:24-04:0040401http://forums.silverlight.net//p/12448/40401.aspx/1?Re+Silverlight+User+Control+InheritanceRe: Silverlight User Control Inheritance <p>Michael, </p> <p>What he's asking is if there's a way to do something like this:</p> <p>public class BaseControl : UserControl<br> {<br> }</p> <p>public class InheritedControl : BaseControl<br> {<br> }</p> <p>The problem is that there's no way to tell the code generator that the InheritedControl's generated partial class should be&nbsp;inherited fron BaseControl and not UserControl. In WPF you can replace the &lt;UserControl&gt; tag in the xaml with something like &lt;my:BaseControl&gt; and refer to the correct namespace and it will work, but this doesn't work in Silverlight 2.</p> <p>This is a known bug and the Silverlight team is aware of it, hopefully it will be fixed for the next release. I don't know of any good workarounds for it at this point, I've tried a bunch of different things to get around this.</p> 2008-03-24T11:50:03-04:0040413http://forums.silverlight.net//p/12448/40413.aspx/1?Re+Silverlight+User+Control+InheritanceRe: Silverlight User Control Inheritance <p>Hello Bill,</p> <p>Thanks for that. </p> <p>I have tried the way that I mentioned in my previous thread. I made a few changes since the requirement is the nested controls but it is working fine. &nbsp;</p> <p><b>1. Create new silverlight project called &quot;SL2Controls&quot;&nbsp;</b></p> <p><b>2. Add a class called BaseControl</b> </p> <p>using System;<br> using System.Windows;<br> using System.Windows.Controls;<br> using System.Windows.Documents;<br> using System.Windows.Ink;<br> using System.Windows.Input;<br> using System.Windows.Media;<br> using System.Windows.Media.Animation;<br> using System.Windows.Shapes;<br> <br> namespace SL2Controls {<br> &nbsp;&nbsp;&nbsp; public class <b>BaseControl : UserControl</b> {<br> <br> &nbsp;&nbsp;&nbsp; }<br> }<br> &nbsp;</p> <p><b>3. Add Silverlight User control called &quot;InheritedControl&quot;&nbsp;</b></p> <p><u>XAML</u></p> <p>&lt;<b>BaseControl</b> x:Class=&quot;SL2Controls.InheritedControl&quot;<br> &nbsp;&nbsp;&nbsp; xmlns=&quot;http://schemas.microsoft.com/client/2007&quot; <br> &nbsp;&nbsp;&nbsp; xmlns:x=&quot;http://schemas.microsoft.com/winfx/2006/xaml&quot; <br> &nbsp;&nbsp;&nbsp; Width=&quot;400&quot; Height=&quot;300&quot;&gt;<br> &nbsp;&nbsp;&nbsp; &lt;Grid x:Name=&quot;LayoutRoot&quot; Background=&quot;Red&quot;&gt;<br> <br> &nbsp;&nbsp;&nbsp; &lt;/Grid&gt;<br> &lt;/<b>BaseControl</b>&gt;<br> &nbsp;</p> <p><b>C#</b></p> <p>using System;<br> using System.Collections.Generic;<br> using System.Linq;<br> using System.Windows;<br> using System.Windows.Controls;<br> using System.Windows.Documents;<br> using System.Windows.Input;<br> using System.Windows.Media;<br> using System.Windows.Media.Animation;<br> using System.Windows.Shapes;<br> <br> namespace SL2Controls {<br> &nbsp;&nbsp;&nbsp; public partial class <b>InheritedControl : BaseControl</b> {<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public InheritedControl() {<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; InitializeComponent();<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br> &nbsp;&nbsp;&nbsp; }<br> }<br> &nbsp;</p> <p>4. Add mapping in AssemblyInfo.cs under Properties of SL2Controls</p> <p>using System.Reflection;<br> using System.Runtime.CompilerServices;<br> using System.Runtime.InteropServices;<br> <b>using System.Windows.Markup;</b><br> // General Information about an assembly is controlled through the following <br> // set of attributes. Change these attribute values to modify the information<br> // associated with an assembly.<br> [assembly: AssemblyTitle(&quot;SL2Controls&quot;)]<br> [assembly: AssemblyDescription(&quot;&quot;)]<br> [assembly: AssemblyConfiguration(&quot;&quot;)]<br> [assembly: AssemblyCompany(&quot;&quot;)]<br> [assembly: AssemblyProduct(&quot;SL2Controls&quot;)]<br> [assembly: AssemblyCopyright(&quot;Copyright ©&nbsp; 2008&quot;)]<br> [assembly: AssemblyTrademark(&quot;&quot;)]<br> [assembly: AssemblyCulture(&quot;&quot;)]<br> <b>[assembly: XmlnsDefinition(&quot;http://schemas.microsoft.com/client/2007&quot;, &quot;SL2Controls&quot;)]</b><br> // Setting ComVisible to false makes the types in this assembly not visible <br> // to COM components.&nbsp; If you need to access a type in this assembly from <br> // COM, set the ComVisible attribute to true on that type.<br> [assembly: ComVisible(false)]<br> <br> // The following GUID is for the ID of the typelib if this project is exposed to COM<br> [assembly: Guid(&quot;27885afb-0308-473e-9773-73350bc1555f&quot;)]<br> <br> // Version information for an assembly consists of the following four values:<br> //<br> //&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Major Version<br> //&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Minor Version <br> //&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Build Number<br> //&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Revision<br> //<br> // You can specify all the values or you can default the Revision and Build Numbers <br> // by using the '*' as shown below:<br> [assembly: AssemblyVersion(&quot;1.0.0.0&quot;)]<br> [assembly: AssemblyFileVersion(&quot;1.0.0.0&quot;)]<br> &nbsp;</p> <p><b>5. Add this Inherited control to Page.xaml.</b></p> <p>&lt;UserControl x:Class=&quot;SL2Controls.Page&quot;<br> &nbsp;&nbsp;&nbsp; xmlns=&quot;http://schemas.microsoft.com/client/2007&quot; <br> &nbsp;&nbsp;&nbsp; xmlns:x=&quot;http://schemas.microsoft.com/winfx/2006/xaml&quot; <br> <b>&nbsp;&nbsp;&nbsp; xmlns:myctl=&quot;clr-namespace:SL2Controls&quot;</b><br> &nbsp;&nbsp;&nbsp; Width=&quot;400&quot; Height=&quot;300&quot;&gt;<br> &nbsp;&nbsp;&nbsp; &lt;Grid x:Name=&quot;LayoutRoot&quot; Background=&quot;White&quot;&gt;<br> <b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;myctl:InheritedControl/&gt;</b><br> &nbsp;&nbsp;&nbsp; &lt;/Grid&gt;<br> &lt;/UserControl&gt;<br> </p> <p>then, run the application.&nbsp; (You don't need to update *.g.cs file.)&nbsp;</p> <p><b>Download Source</b>: <a href="http://michaelsync.net/demo/SL2Controls.zip"> http://michaelsync.net/demo/SL2Controls.zip</a></p> <p><a href="http://michaelsync.net/demo/SL2Controls.zip"></a>There is one weakness in this trick. You will lost the designer in InheritedControl.xaml but you won't get any error. </p> <p>Feel free to let me know if I was missing something or etc.. I'm not sure whether this is a known issue or not. but it works. Feel free to let me know if you have any comment or suggestion. I love to try more.&nbsp; :) <br> </p> 2008-03-24T12:15:44-04:0040417http://forums.silverlight.net//p/12448/40417.aspx/1?Re+Silverlight+User+Control+InheritanceRe: Silverlight User Control Inheritance <p>Ah pretty cool, looks like you may have found the workaround I was looking for. The step I was missing was the AssemblyInfo.cs stuff.</p> <p>Thanks,<br> Bill&nbsp;</p> 2008-03-24T12:29:53-04:0040452http://forums.silverlight.net//p/12448/40452.aspx/1?Re+Silverlight+User+Control+InheritanceRe: Silverlight User Control Inheritance <p></p> <blockquote><span class="icon-blockquote"></span> <h4>Bill Reiss</h4> The step I was missing was the AssemblyInfo.cs stuff.</blockquote> &nbsp; <p></p> <p>Yes. I didn't know about that earlier. but Yi-Lun explained me like that below in <a href="/forums/p/10986/34909.aspx">this post</a>. Yi-Lun is a great person. :) <br> </p> <p></p> <blockquote><span class="icon-blockquote"></span> <h4>Yi-Lun</h4> &nbsp; <br> <p></p> <p>Hello, there're some issues related to UserControl inheriting that we're investigating... I'm surprised to see this works:</p> <p>&lt;MyUserControlBase x:Class=&quot;SL2Test.Page&quot;<br> &nbsp;&nbsp;&nbsp; xmlns=&quot;http://schemas.microsoft.com/client/2007&quot; <br> &nbsp;&nbsp;&nbsp; xmlns:x=&quot;http://schemas.microsoft.com/winfx/2006/xaml&quot;<br> &nbsp;&nbsp;&nbsp; Width=&quot;400&quot; Height=&quot;300&quot;&gt;<br> &nbsp;&nbsp;&nbsp; &lt;Canvas Width=&quot;400&quot; Height=&quot;300&quot; Background=&quot;Red&quot;&gt;<br> &nbsp;&nbsp;&nbsp; &lt;/Canvas&gt;<br> &lt;/MyUserControlBase&gt;</p> <p>Actually it shouldn't work. MyUserControlBase is not in the namespace http://schemas.microsoft.com/client/2007. This xml namespaces maps to a series of clr namespaces such as System.Windows.Controls. But there's no way it can map to your own namespace. Also this behavior is inconsistent with WPF.</p> <p>This is likely to be a bug. I'll redirect this to our product team. Thanks for letting us know.</p> <p>You're right. This can be a work round.</p> <p>In the class library project's AssemblyInfo.cs file, add this:</p> <font size="2"></font> <p><font size="2">[</font><font color="#0000ff" size="2">assembly</font><font size="2">: </font><font color="#2b91af" size="2">XmlnsDefinition</font><font size="2">(</font><font color="#a31515" size="2">&quot;http://schemas.microsoft.com/client/2007&quot;</font><font size="2">, </font><font color="#a31515" size="2">&quot;YourNamespace&quot;</font><font size="2">)]</font></p> <p>Now after you add reference to this assembly in your main project, you can use any classes in this namespace in your XAML files.</p> <p>But without the namespace mapping, your original code should not work. So this still seems to be an issue...</p> <p>&nbsp;</p> </blockquote> <br> <p></p> <br> 2008-03-24T13:57:40-04:0040724http://forums.silverlight.net//p/12448/40724.aspx/1?Re+Re+Silverlight+User+Control+InheritanceRe: Re: Silverlight User Control Inheritance <p>Thanks guys, will test it tonight.</p> 2008-03-25T06:56:28-04:0040923http://forums.silverlight.net//p/12448/40923.aspx/1?Re+Re+Silverlight+User+Control+InheritanceRe: Re: Silverlight User Control Inheritance <p>&nbsp;Ooo, I had a similar implementation for this working, but did not have the modified AssemblyInfo code.&nbsp; That gets rid of the error message, thanks!<br> </p> 2008-03-25T17:44:10-04:0041210http://forums.silverlight.net//p/12448/41210.aspx/1?Re+Re+Silverlight+User+Control+InheritanceRe: Re: Silverlight User Control Inheritance <p></p> <blockquote><span class="icon-blockquote"></span> <h4>yourbuddypal</h4> did not have the modified AssemblyInfo code</blockquote> &nbsp; <p></p> <p>I already mentioned the reply from Yi-lun in my previous post. This is a bug if it's working fine without adding mapping in assemblyinfo.<br> </p> 2008-03-26T13:22:56-04:0041218http://forums.silverlight.net//p/12448/41218.aspx/1?Silverlight+User+Control+InheritanceSilverlight User Control Inheritance <p>Im very happy to found this post,You know when very time a modify some thing or add a new element to the partcual form ,i need to rechange the inherited class name,It maked me crazy.</p> <p>Right now in my project i coud only do is very child class write a some method , using reflese to get the method by name. It's also make me crazy.</p> <p>Thank you very much. Ill try it.</p> <strike><font face="Times New Roman" size="3"></font></strike> 2008-03-26T13:56:17-04:0041496http://forums.silverlight.net//p/12448/41496.aspx/1?Re+Silverlight+User+Control+InheritanceRe: Silverlight User Control Inheritance <p></p> <blockquote><span class="icon-blockquote"></span> <h4>egoZd</h4> <p></p> <p>Im very happy to found this post,You know when very time a modify some thing or add a new element to the partcual form ,i need to rechange the inherited class name,It maked me crazy.</p> <p>Right now in my project i coud only do is very child class write a some method , using reflese to get the method by name. It's also make me crazy.</p> <p></p> </blockquote> &nbsp; <p></p> <p>Both ways make you crazy? :) haha. </p> <p></p> <blockquote><span class="icon-blockquote"></span> <h4>egoZd</h4> Thank you very much. Ill try it.</blockquote> &nbsp; <p></p> <p>Your welcome! Good luck. :)&nbsp;</p> 2008-03-27T03:34:32-04:0046259http://forums.silverlight.net//p/12448/46259.aspx/1?Re+Silverlight+User+Control+InheritanceRe: Silverlight User Control Inheritance <p>Hi,</p> <p>I'm having problems in making my specialized control to work. It is compling fine but when executed gives me an error which i can't find out from where it comes...</p> <p>&nbsp;AG_E_PARSER_BAD_TYPE [Line: 4 Position: 29]</p> <p>I have a SectionControl class that inherits from UserControl and implements an interface. I substituted a control i already had for this one and it gives error on execution.<br> <br> How can i find what is wrong?</p> <p>Any tip?</p> <p><br> Thx,</p> <p>Nuno<br> &nbsp;</p> 2008-04-14T07:28:00-04:0046260http://forums.silverlight.net//p/12448/46260.aspx/1?Re+Silverlight+User+Control+InheritanceRe: Silverlight User Control Inheritance <p>As far as i remember, this means you may have wrong / unsupported markup in your xaml.</p> <p>Debugging it will not help as you can't debug xaml markup.</p> <p>This will be a painfull experiance for you, so be prepaired.</p> 2008-04-14T07:34:04-04:0046263http://forums.silverlight.net//p/12448/46263.aspx/1?Re+Silverlight+User+Control+InheritanceRe: Silverlight User Control Inheritance <p>hehehe</p> <p>That was really encouraging! :)</p> <p>Thx</p> <p>Nuno</p> 2008-04-14T07:42:38-04:0046267http://forums.silverlight.net//p/12448/46267.aspx/1?Re+Silverlight+User+Control+InheritanceRe: Silverlight User Control Inheritance <p>Sorry dude, i had that problem once and it was NOT fun.</p> <p>What I did was comment out blocks of xaml until it got working again.<br> Then started plugin stuff back in bit by bit to see if it will work again.</p> <p>Some times you changed the name of a resource or something that is now can't be found and causes this type of error.</p> <p>Encouragement: &quot;You can do it!!!&quot; ;)</p> <p>&nbsp;</p> 2008-04-14T07:49:25-04:0046273http://forums.silverlight.net//p/12448/46273.aspx/1?Re+Silverlight+User+Control+InheritanceRe: Silverlight User Control Inheritance <p>Hi,</p> <p>I think i was misunderstood. You are completly right and i have already passed for some situations in silverlight that are desperating.</p> <p>The only way is really what you have just said. Comment, and lost a lot of time. </p> <p>Sorry if i made you feel unconfortable.</p> <p>Thx!&nbsp;</p> <p>Nuno</p> 2008-04-14T08:02:40-04:0046280http://forums.silverlight.net//p/12448/46280.aspx/1?Re+Silverlight+User+Control+InheritanceRe: Silverlight User Control Inheritance <p>When i did this step for the specialization of the user control, i had to insert the assembly line:</p> <p>&nbsp;<font size="2">[</font><font color="#0000ff" size="2">assembly</font><font size="2">: </font><font color="#2b91af" size="2">XmlnsDefinition</font><font size="2">(</font><font color="#a31515" size="2">&quot;http://schemas.microsoft.com/client/2007&quot;</font><font size="2">, </font><font color="#a31515" size="2">&quot;PRW&quot;</font><font size="2">)]</font></p> <p><font size="2">&nbsp;</font><font size="2">But now, in Blend, it complains about </font> </p> <p><font size="2">&lt;Style TargetType=&quot;MenuButton&quot; x:Name=&quot;SectionButtonStyle&quot; &gt;<br> &nbsp;&nbsp;&nbsp;&lt;Setter Property=&quot;Template&quot;&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&lt;Setter.Value&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ControlTemplate TargetType=&quot;MenuButton&quot;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;-----<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;Grid x:Name=&quot;RootElement&quot; Background=&quot;{TemplateBinding Background}&quot;&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;Grid.Resources&gt;</font></p> <p><font size="2">&nbsp;Saying:</font></p> <p>Invalid attribute value MenuButton for property TargetType.</p> <p>Which is a custom control i have made.</p> <p>Maybe this is the problem that is making that exception to be raised, but i cant find why is this making a problem.</p> <p>Any tips?</p> <p>Thx,</p> <p>Nuno</p> 2008-04-14T08:16:25-04:0046612http://forums.silverlight.net//p/12448/46612.aspx/1?Re+Silverlight+User+Control+InheritanceRe: Silverlight User Control Inheritance <p></p> <blockquote><span class="icon-blockquote"></span> <h4>sinosoidal</h4> TargetType=&quot;MenuButton&quot;</blockquote> &nbsp; <p></p> <p>I think it will happen like that. If you look at the style for Datagrid, it used &quot;local:DataGrid&quot;&nbsp; not just &quot;Datagrid&quot;. So, I think you may need to add some prefix in your style too.. <br> </p> 2008-04-15T08:40:00-04:0046647http://forums.silverlight.net//p/12448/46647.aspx/1?Re+Silverlight+User+Control+InheritanceRe: Silverlight User Control Inheritance <p>Hi,</p> <p><font face="Times New Roman" size="3">Even if i add the prefix i have errors.</font></p> <p><font face="Times New Roman" size="3">Another thing. I was tryning to do what you suggest in the the top of the thread in order to have the specialized user control and it doesnt work. When running crashes! :S</font></p> <p>Nuno</p> 2008-04-15T11:28:43-04:0046653http://forums.silverlight.net//p/12448/46653.aspx/1?Re+Silverlight+User+Control+InheritanceRe: Silverlight User Control Inheritance <p>Hi,</p> <p></p> <blockquote><span class="icon-blockquote"></span> <h4>sinosoidal</h4> Even if i add the prefix i have errors.</blockquote> &nbsp; <p></p> <p>If you can make some sample, I would happy to take a look. you can reach me with this address mchlsync AT gmail DOT com.&nbsp;</p> <p></p> <blockquote><span class="icon-blockquote"></span> <h4>sinosoidal</h4> Another thing. I was tryning to do what you suggest in the the top of the thread in order to have the specialized user control and it doesnt work. When running crashes!</blockquote> &nbsp; <p></p> <p>Which one? the second one? I think you are doing something totally wrong. The solution that I suggested is working fine for many people. Just create &quot;new&quot; project and follow the steps that I mentioned. I will work.&nbsp;</p> 2008-04-15T11:56:03-04:00