Matt Casto's .NET Journal RSS 2.0
 Tuesday, September 25, 2007
I haven't posted in over a week about my progress with my 30 day sprint to learn Silveright because it died. Right after the last post I ran into several roadblocks, the largest of which was the loss of enough free time to regularly spend the time needed. Also, after a couple of days of inactivity I lost my motivation.

This morning I realized that today is the 30 day mark. So did my expirement fail? In the sense that I didn't spend the hour per day that I pledge to myself, yes it did. But, in the sense that I learned a lot about Silverlight and got myself into more of a habit of setting aside time to learn, it was a success.

The next time I decide to do a sprint of this kind, I will check with my event planner (my wife) and make sure that the schedule will allow for the time I want to spend. Also, I think I'll go for a shorter time span. I think my next sprint will probably be either 2 weeks or 15 days, and I might try to lay out a goal for each day ahead of time.

Right now I'm involved in a project in my free time to build a Silverlight application that has a pretty aggressive timeline, but I'll try to post examples of things I've figured out or problems I ran into along the way. I also have several ideas of some fun apps to write that I'll blog about as well.

Labels: ,

Tuesday, September 25, 2007 7:40:00 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
silverlight | sprint
 Thursday, September 13, 2007
Tonight was the first chance I've had to spend any time with Silverlight since the weekend. When it rains, it pours. When septic tanks back up, you have to rearrange your priorities a bit. :-)

Tonight I started a new Silverlight 1.1 project in which I created a few textareas that I'm planning on reading and modifying through my Silverlight application. I was going through the Dom Access Quickstart and only made it to the third step in the first section before hitting a roadblock.

The quickstart says to create a variable of type HtmlDocument, but Visual Studio doesn't list it in Intellisense! My first thought was maybe that the System.Web name space needed to be referenced, but when I tried to add a reference to the project I didn't see it as an option. In fact, there are only a handful of assemblies available to reference by default.


My next thought was to hit the Silverlight.net Forums and look for a post where someone else had the same problem. Guess what? The forums don't have a search function. After reading through 3 pages I gave up and tried Google.

My search for 'silverlight htmldocument' led me to "Silverlight how-to: let the DOM interact with Silverlight". While the demo is very basic and regurgitates what's already available in the Quickstarts, it had one piece of information that made all the difference: it mentions that I need to add a reference to System.Windows.Browser in order to get to the HtmlDocument.

In retrospect, I could have probably found this a lot quicker if I'd just searched for HtmlDocument on MSDN. However, when I tried this, all I found was links to HtmlDocument in System.Windows.Forms. Buried in the search results I did find a link to Dave Relyea's post "Calling Javascript from C#" which is a much better resource.

This solved my problem and I'm ready to move on. Maybe tomorrow I'll be able to make some headway on some of the ideas I want to try.

Labels: ,

Thursday, September 13, 2007 8:46:00 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
silverlight | sprint
 Saturday, September 08, 2007
Component One has a controls suite called Sapphire for Silverlight 1.1 that has a lot more promise than the Telerik one.

And there's a textbox control! Too bad that hitting backspace in their textbox trigger's Firefox's back button. I found that bug in the first 10 seconds. Too bad.

Labels:

Saturday, September 08, 2007 1:56:00 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
silverlight
Telerik released it's RadControls for Microsoft Silverlight product on the same day Silverlight 1.0 was released. The cube control is cool, but the other ones don't really seem to be all that special. The button and layout controls in particular will probably be obsolete once Silverlight 1.1 is released. Still, it's nice to see what kinds of things will be available soon.

Labels:

Saturday, September 08, 2007 8:37:00 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
silverlight
 Friday, September 07, 2007
I found that there are some generic controls included with the Microsoft Silverlight 1.1 SDK Alpha September Refresh. (We need an abbreviation for that; it's too long. How about MS1.1SDKASR?)

From the Welcome page in the MS1.1SDKASR, click on the Sample UI Controls for the readme, which includes this:
This package contains sample source code for some common
UI controls for the Silverlight managed code framework.

You may customize these controls and use them in your
Silverlight applications.

In this package, you will find a functional solution
with C# code files representing control behavior and XAML
markup files representing the visual aspects of the control.
Also included in the solution is test code that demonstrates
usage of the controls, how events can be hooked up and
handled, etc.

The following sample controls are included:
* Button
* Slider
* ScrollBar
* ScrollViewer
* ListBox


Wha? No Textbox control? Let's hope that they're working hard on one and it makes it into the 1.1 release.

I spent the day pretty much going through the sample controls and seeing how they work. I don't think they're suitable to be used in a production application, but they're good for learning.

Labels: ,

Friday, September 07, 2007 8:21:00 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
silverlight | sprint
Day 12

On Day 11 I came to the realization that there wasn't any supported XAML in Silverlight that allowed text entry and that you had to tie your Silverlight app to an HTML textbox/textarea in order to do this.

I decided to try putting an HTML textarea over a Silverlight app and see how I could get them to work together. I wanted to have a javascript method called when the contents of the textarea changed, and have that javascript method call into the Silverlight app. After an hour or so of frustrating trial and error and reading through documentation online, I realized that you can't call Silverlight 1.0 from javascript.

Day 13

Up to now I've been working on a system with the Silverlight 1.0 SDK and Visual Studio 2008 March CTP. I have a very slow internet connection and my laptop leaves a lot to be desired, so this was holding me back from installing Visual Studio 2008 Beta 2. Last night I decided the time had come.

I had started the download of Visual Studio 2008 the night before, which took around 23 hours. At around 8pm I uninstalled the March CTP, then uninstalled all .NET 3.5 stuff hanging around. This all took almost an hour and a half. I then installed Beta 2, the Alpha Tools, and downloaded the Silverlight 1.1 Alpha SDK.

At this point it was almost 11pm and I was out of time to spend for the evening. So much for my Day 13 of the sprint. I realy hope to get further on the text entry experiments this weekend.

Labels: ,

Friday, September 07, 2007 6:49:00 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
silverlight | sprint
 Thursday, September 06, 2007
I noticed this morning that the Silverlight Get Started page states that there's a Silverlight 1.1 Alpha September Refresh. I don't remember seeing anything in Scott Guthrie's post about a September specific version of the 1.1 Alpha Refresh. I downloaded the file and it has the same size and version as the 1.1 Alpha Refresh that I downloaded last month. The Get Started page also has a link to the Silverlight SDK 1.1 Alpha September Refresh. What's going on here?

I found this comment from Scott Guthrie in his above mentioned blog post.
The 1.1 refreshes from MIX to now have mainly just been updates to keep in sync with the Silverlight 1.0 code-base. Now that Silverlight 1.0 has shipped, the upcoming refreshes of 1.1 will be feature updates with more functionality. So you'll start to see more functionality appear soon.

Labels:

Thursday, September 06, 2007 6:27:00 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
silverlight
 Wednesday, September 05, 2007
Silverlight 1.0 has been released! Also, it looks like Microsoft is partnering with Novell to make sure that Moonlight fully supports the Silverlight 1.0 and 1.1 programming models.

Source

Labels:

Wednesday, September 05, 2007 10:10:00 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
silverlight
Days 8-10

Days 8 through 10 were labor day weekend and I was out of town for most of that time. I did get a chance to play with Expression Blend more and read the SDK and Expression Blend documentation about various XAML keywords, polygon and polyline in particular.

I was trying to figure out how to create some basic shapes in XAML. My first attempts were by creating a polygon with the correct points, but I found myself getting massively sidetracking trying to remember basic geometry from my freshman year of high school. After reading more documentation I found that I could draw some different shapes in Blend, then combine them into a single path, which might be the best way to accomplish what I was going for.

Day 11

Last night, I was trying to create a basic form in Silverlight. I started by looking at the documentation for the textblock object, and found all kinds of interesting ways that text can be transformed and output, including the run and linebreak objects. Unfortunately, I didn't find any information about how to allow the user to enter text into a silverlight app.

Eventually I found the Using Input Method Editors for Text Entry in Silverlight screencast which covers what I was looking for, in addition to other interesting features.

I've got to say I'm pretty disappointed to learn that in order to do text entry in a Silverlight app, I've got to actually overlay an HTML textarea over the Silverlight control, and use javascript to read/write text from that textarea.

I have a lot of ideas to experiment with such as whether I can create a textarea with a transparent background and no border, which would allow me to do a better job integrating it with the Silverlight control. Or perhaps I could have a text area that allows entry, but what's entered is immediately hidden and reproduced in the a textblock in XAML, fooling the user into thinking that they're entering text directly into Silverlight.

Labels: ,

Wednesday, September 05, 2007 7:12:00 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
silverlight | sprint
 Friday, August 31, 2007
I really want to get the 4GB version of the Iron Key for my next portable storage solution. I wonder how the encryption would affect performance of virtual machines.


From TFA:
Like you, the US Military wanted portable but secure storage, and the guys at IronKey stepped up. They've developed the perfect solution that's one-part thumb-drive, and two parts Mission: Impossible. Their thumb drives hold up to 4 Gigabytes of data, but includes a hardware encryption chip that scrambles the data so as to be completely unreadable without a password.

Passwords can be hacked, but not the IronKey. It's built to withstand attacks both virtual and physical. 10 incorrect password attempts, and the encryption chip self-destructs, making the contents of the flash drive totally unreadable. The contents of the drive are filled with epoxy, so if a hacker tries to physically access the chips, he'd more likely damage them instead. Even if he did get access to the memory chips, they'd be worthless without the encryption chip. Electron-shielded, even a scanning electron microscope can't get inside.


My gadget lust has been activated.

Labels:

Friday, August 31, 2007 6:34:00 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
devices
 Thursday, August 30, 2007
Tonight I went through the Silverlight QuickStart Using Microsoft Expression Blend tutorial. I didn't do everything in the tutorial and tried some experimentation as well which was pretty fun. I'm really glad I did the quick start because just starting up Expression Blend and trying to figure things out wasn't working for me.

Note - if you're using Expression Blend 2 August Preview some things in the quick start tutorial have changed. In particular, creating my first timeline was frustrating because the button to add a new timeline moved between the May and August previews.

Also, I found designwithsilverlight.com which has some great looking tutorials that I'll go through once I'm done with the materials from silverlight.net.

Labels: ,

Thursday, August 30, 2007 9:04:00 PM (Eastern Standard Time, UTC-05:00)  #    Comments [1] -
silverlight | sprint
Real life has prevented me from spending at least an hour with Silverlight this week. Even when you make a commitment to yourself, there are some things that take a higher priority.

That said, I did find a cool blog that has posts related to making games for Silverlight - Silverlight Games 101

In fact, the silverlightrocks.com site could be a good source of information as it grows.

Since you can get through the learning materials online pretty quickly, spending 30 days focusing on Silverlight means that most of the time will be working with actual code. It helps to have a real project to work on, and I am lucky enough to be involved in one. It's not a commercial project, but more of a community project that I'm donating time to. More detailed information will be forthcoming.

Labels: ,

Thursday, August 30, 2007 10:52:00 AM (Eastern Standard Time, UTC-05:00)  #    Comments [2] -
silverlight | sprint
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2009
Matt Casto
Sign In
All Content © 2009, Matt Casto
Theme based on DasBlog theme 'Business' created by Christoph De Baene (delarou)