DCSIMG
Silverlight-4 - Shimmy on .NET

Browse by Tags

All Tags » Silverlight-4 (RSS)

LeakEvent → WeakEvent by Shimmy

I'm sure not any Silverlight developer is aware of the fact that when one subscribes to an event, a strong reference to the handler class ('target') is attached to the event source ('source'), hence, if the source object life-cycle is longer than the target, memory is leaked, becuase when you don't need the target anymore and all its references are removed, there is still one reference to it by that event handler in the source, and thus, won't get collected by GC. A strong...

Tip: VB's 'My' namespace for Silverlight by Shimmy

Silverlight lacks the My namespace, but for those who are addicted to the My keyword, it can still be achieved manually. Open windows explorer and navigate to your project Add a new file MyExtension.vb to this folder (location and filename are optional) Include it in your project Add the below content to it Although the Info , Computer , and many other features are missing from the Silverlight runtime, you could use alternatives from System.Reflection etc. Here is a MyExtension.vb sample, you can...

TIP: Have the 'SILVERLIGHT' processor directive appear in intellisense in the ASP.NET host project (VB.NET) by Shimmy

Nothing special anyway, but I thought let's write it down briefly. In Silverlight solutions, especially when RIA Services is enabled, it's pretty common to use the SILVERLIGHT processor directive in the shared code and other. So the SILVERLIGHT directive is known in the Silverlight project, but in the ASP.NET there it doesn't appear in the intellisense, and since this is always valid, it's kinda error-prone when there is no intellisense support. To enable the intellisense simply open...
Powered by Community Server (Commercial Edition), by Telligent Systems