When I did a search on "Silverlight Database" there weren't many results, and none of them actually mentioned a small database that you could embed into your Silverlight application. So, I thought I'd share a solution that I've used to store application data on the client using a combination of LINQ and Isolated Storage. This actually gives you a small "SQL"-like database since you can use LINQ to interact with it.
Basically, this technique constist of:
I was just building something in Silverlight that makes use of the Isolated Storage, and I uncovered a bug in Silverlight 2 Beta 2 that cause's it to crash and you are unable to write to the Isolated Storage. So, I dug in and found the location on disk where Silverlight stores the files for Isolated Storage.
Here's the file location under Windows Vista where Silverlight stores the files for Isolated Storage:
It's been forever since I posted anything about Mono, but this stuff deserves some attention. Mono's Winforms 2.0 is now API Complete Yesterday, it was announced that the System.Windows.Forms support in Mono (an open source implementation of the .NET Framework targeting Linux, MacOS, Windows, etc.) has finally reached a state of being API complete. This means the public API for WinForms in Mono is exactly the same as in .NET; with a total of 12,776 methods! The first check-in of WinForms occur... [More]
The standard TextBox control that is built into Silverlight 2 Beta 2 is a bit lacking and is missing alot of features that we have become accustomed to in a TextBox. One of those features is being able to mask the characters being displayed when its used to accept passwords. Here's a small PasswordTextBox control I built that does just that; it masks the characters from being displayed so you can accept passwords like you're used to.
Update 6/7/2008 - I just tested this w... [More]
Here an example of creating a new DIV element and setting some of it's properties:
HtmlElement myDiv = HtmlPage.Document.CreateElement("div&quo... [More]
Since Silverlight is just a subset of WPF, there are alot of things missing. One missing thing I found is the System.Windows.MessageBox. I'm a little puzzled as to why they would have left this out, but I imagine MessageBox's are handled very differently in different Operating Systems. It's probably a little work to get it working on both Mac and Windows, but I hope it gets into the final release. It's not a major feature, but one that is used quite often when developing desktop ... [More]
Silverlight does not have direct access to the local file system for security reasons. However, you can still prompt the user to select a specific file to open using the OpenFileDialog similarly to how you do in .NET. Here's some basic code that demonstrates opening a user specified file using Silverlight 2 Beta 1.
This basic example opens up a user specified file, and displays its contents within a textbox.
<UserControl x:Class="SilverlightFileSystemInfo.Page"  ... [More]
Silverlight 2 Beta 1 just came out this morning, so I started checking it out immediately. I installed the Silverlight Tools for Visual Studio and noticed that when a Silverlight Application is compiled a .xap file is created that contains the application. But, what exactly is a .xap file, and what exaclty is in there? What is an .xap file? A .xap file is basically a compiled Silverlight application. The file is actually a .zip file that contains all the files necessary for the application. ... [More]
I watched the MIX'08 Keynote online this morning, and here are some notes I took.
Notes from Ray Ozzies talk:
Some investments will be realized this week:
Internet Explorer 8
Advertising on the web is expected to grow from $40 billion to $80 billion over the next few years.
Social networking is growing and will become an integral part of the web just as familiar as Files and Folders are on the desktop.
Web will be used as a hub in using and managing al... [More]