Software for fun and profit
Jonathan Wax
Uncategorized
Silverlight 5 pInvoke USB/Removable Drive detector
Hi, A friend of mine asked me if an elevated trust Silverlight 5 application could monitor windows events, specifically when a USB drive is inserted or removed. I naturally said YES, knowing that pInvoke is supported, but decided to take a few moments to write some code. After searching the web I found a great [...]
Posted in Uncategorized | No Comments »
Create shortcut to SL5 OOB App
Hi, I’m loving the power of Silverlight 5 Out of Browser (OOB) applications, now with improved file access and pInvoke. Thinking about deploying an OOB app to my users, I was wondering if I could create an OOB app that would launch itself when the OS starts. Looking at how a user invokes the “Install [...]
Posted in Uncategorized | No Comments »
Silverlight 5 pInvoke USB/Removable Drive detector
Original post: http://www.netusup.com/2011/12/31/silverlight-5-pinvoke-usbremovable-drive-detector/ Hi, A friend of mine asked me if an elevated trust Silverlight 5 application could monitor windows events, specifically when a USB drive is inserted or removed. I naturally said YES, knowing that pInvoke is supported, but decided to take a few moments to write some code. After searching the web I [...]
Tags: pInvoke, Silverlight, Silverlight 5
Posted in Uncategorized | No Comments »
Silverlight 5 (OOB) Win32 API GetLogicalDriveStrings
Hi, Starting to use Silverlight 5 and enjoying P/Invoke! We needed the ability to list drive letters on the user’s computer. Using System.Runtime.InteropServices, we imported the GetLogicalDriveStrings method. Then we created our own GetLogicalDrives() method which extracts the drive letters from the buffer that is returned. Here’s the code: using System.Runtime.InteropServices; using System.Windows; using System.Windows.Controls; [...]
Tags: pInvoke, Silverlight, Silverlight 5
Posted in Uncategorized | No Comments »
How to set Foreground of DataGrid Column with ValueConverter
If you need to change the Foreground (Color) of a DataGrid Column based on its value you will probably encounter a problem when you try to bind your DataGridTextColumn.Foreground property to a ValueConverter. I’ll show you how we do it and hopefully save you an hour or two. Tools used? Visual Studio 2010 Silverlight 4 [...]
Tags: DataGrid, Silverlight
Posted in Uncategorized | No Comments »
WCF RIA Services, DataGrid Filters NO DomainDataSource
So many of the Silverlight samples use minimal code in an attempt to use controls, binding and commanding techniques to create application by just using markup. Although these techniques are cool and may be great for rapid prototyping of an application, our team prefers to write code that gives us access to the details [...]
Tags: DataGrid, Filter, No DomainDataSource, Silverlight, WCF RIA
Posted in Uncategorized | No Comments »
Silverlight solves our deployment problems.
Mature Architecture + Easy Deployment + Great UX = SILVERLIGHT When ever I am approached to help design or improve an architecture for a system, one of the first issues I ask about is deployment requirements. I generally like to choose the technologies that require writing the least amount of code to deliver a feature: [...]
Posted in Uncategorized | 6 Comments »


