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: silverlight, sprint
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: silverlight, sprint
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: silverlight, sprint
Day 12On 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 13Up 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: silverlight, sprint
Days 8-10Days 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 11Last 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: silverlight, sprint
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: 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: silverlight, sprint
I didn't have as much time to spend on day 2 as I did the first day, but I did get some things done. Mostly I read through some of the quickstarts and watched some of the videos at the Silverlight site. JD suggested to me that I keep a list of resources to help manage my thoughts. I've been saving interesting pages to del.icio.us with a Silverlight tag for a while now, but I think I'll definitely be more cognisant to save everything I run into. http://del.icio.us/mattcasto/silverlightProbably the most interesting thing that I found was Silverlight Pad, an online equivalent to XAML Pad. Looking at what's available there and making changes to see what happens is a great way to get a feel for what's going on. Labels: silverlight, sprint
For my first day of my 30 day learning sprint focusing on Microsoft Silverlight, I'm going to go through the Quickstarts on the community Silverlight website. Before starting with the Quickstarts, I had to set my machine up. Based on Scott Hanselman's post " VS 2008 and .NET 3.5 Beta 2 Releases Made Easy," I downloaded and installed the following: Then I got confused. I wasn't sure whether to start with 1.0 or 1.1. Silverlight 1.0 is at the release candidate stage with a go live license, so it seems like a safe bet. But with 1.1 I can program with c# on the client. I'm 95% more proficient with c# than with javascript, so this is a tough one. While digging around for more details, I found Jesse Liberty's blog posts about learning Silverlight from a .NET developer's perspective. Excellent! Not only is there are series with me as a target audience, but one that is a lot like my planned learning exercise, AND it's by the guy who wrote the book that I started my .NET learning with as well! Jesse's post about the differences between 1.0 and 1.1 lead me to the Silverlight Runtimes Matrix which shed some more light. I could deal with just using javascript for my initial learning, but when I saw that isolated storage wasn't supported in 1.0 that tipped the scale. I'm not sure exactly why ... it could be because one of the first cool demos I saw of Silverlight was how the isolated storage was shared between all browsers. I found the demo again on ExplosiveDog.com's " Silverlight Isolated Storage" post. I switched targets and downloaded the Silverlight 1.1 Alpha Refresh and Silverlight 1.1 SDK. One thing I'm still confused about is whether the 1.1 SDK is up to date with the 1.1 alpha refresh. I kind of doubt it because the search results on Microsoft Download have it listed with a date of 5/17/2007, while the Silverlight 1.0 SDK RC has a date of 7/27/2007. I decided to hold off on installing the 1.1 SDK, but I'd already installed the 1.0 SDK RC so we'll see what happens. At this point I've more than used up my first day's amount of time. Maybe later tonight I'll look at some of the samples in the quickstarts, but now my eyes are tired from staring at the monitor for too long. Too bad there aren't any books out yet, because I could really use some printed text at this point. Labels: silverlight, sprint
Today I've decided to start the 30 day learning sprint that I've been putting off for a while now. The technology that I've decided to learn is Microsoft Silverlight. This was my plan from a few months ago but procrastination lead me to put it off until now. For the next 30 days I am making a pledge to myself to spend at least an hour each day focusing solely on a task that will help me learn Silverlight. Whether that task is reading a tutorial or document, writing or debugging code, or anything else related, the point is that I commit to spending this amount of time each day on the goal. I hope that the one hour requirement will allow this to fit into my family life and schedule without being disruptive. Also, by writing this blog post I'm not only committing this to myself, but hopefully the public announcement will help me stay on task. (Plus, I can always come back and delete this post). I will also post one blog entry detailing what I planned on accomplishing for each day, how it went, and what the outcome was. Labels: silverlight, sprint
|