Saturday, July 14, 2007

Silverlight 1.1 in Action - The Book

Hello!

I am currently working on a book that will target Silverlight 1.1, called "Silverlight 1.1 in Action" and I am seeking some feedback from the community. The first half of the book will address the UI elements of Silverlight, while the second half will discuss the .NET Framework provided with Silverlight 1.1.

Because the first half of the book is squarely focussed on UI components, I thought it would be nice to add some additional value to the book by explaining how to create the various UI components using Microsoft Expression Blend. The incorporation of Blend has caused some internal debate between me and myself. However, I feel that incorporating Blend is important because it may introduce readers to a new, productive tool, while at the same time, helping readers build a vocabularly that can help to communicate with designers more effectively. Essentially, for each UI element, I want to provide the following:
  • An illustration that shows the UI element that is created
  • The XAML that corresponds with the illustration
  • A walkthrough of how to use Blend to create the UI element.
My debate is as follows:

Option 1 - Provide all three items (the illustration, the XAML, and the walkthrough) for each UI component. Here are the advantages/disadvantages I see with this approach:
  • Advantages
    • Readers do not have to flip to the back of the book for Blend content.
    • Encourages the use of Blend while reading the text
  • Disadvantages
    • Takes up a lot of space. This may cause the reader to skip pages to get back into the developer focussed content.
Here is a sample of creating a MediaElement to give you a feel for how this may look in the text if Option 1 is used.

Option 2 - Provide only the illustration and the XAML in the text. Then, reference a walkthrough which is provided in an appendix, instead of in the actual text. Here are the advantages/disadvantages I see with this approach:
  • Advantages
    • Keeps the reader focussed on the developer related content.
  • Disadvantages
    • Treats Blend as a second-rate citizen (it's not, it is especially helpful if you are creating animations)
    • Causes the reader to flip between the actual text and an appendix, this searching can be annoying.
Here is a sample of creating a MediaElement to give you a feel for how this may look in the text if Option 2 is used:


Personally, I am leaning towards Option 2, however, I wanted to seek some feedback before going too far down this path. I look forward to your comments and thank you for your help!

Wednesday, July 04, 2007

WPF - Non-Rectangular Window Sweetness

Recently, I have been working on a small WPF project. It is truly an exciting project and I hope to provide more details on the specifics later. Regardless, I learned something really cool about WPF while working on this project that I felt I needed to share.

My WPF application is not an archetypal rectangular window. It has a very well designed looking interface that really makes the application look nice. One of the distinguishing features is a large image in one of the corners of Window. As an illustration, imagine the application window looking like a more complicated version of the following:



I wanted to ensure that users could only drag the window if they were clicking within the bounds of the window. This means I needed to take into account the area occupied by the green ellipse. I learned how to create non-rectangular windows through this article.

I knew I could use the Path element to define the bounds of my window. However, the following discovery pleasantly surprised me. I was able to use a graphic, which was already created by a graphic designer, and simply make the background of the image file transparent. WPF automatically created the bounds of the window tightly bound AROUND the image.

This made my life significantly simpler. I was afraid I was going to be tinkering with Paths all day long. Very sweet.

My book "Silverlight 1.1. in Action" is coming along nicely. There should be some content available for consumption soon. Thanks for reading!

Thursday, June 14, 2007

Silverlight 1.1 - Slide Deck

If you thought I was done posting content this week after the video walkthrough, you were wrong :)! I presented on Silverlight at the Indianapolis .NET Developers Association monthly meeting on June 16, 2007. I created a Point Point slide deck (complete with notes) that provides a high-level overview of Silverlight.

In addition, I also provided a walkthrough of creating a media player using Silverlight 1.1 during the meeting.

Feel free to use the content of the slidedeck, I only ask that if you use it, you please post a comment explaining what works and what didn't work with your presentation.

Personally, I feel this is a pretty solid overview especially given the time constraints of the presentation. Enjoy!

Tuesday, June 12, 2007

Silverlight 1.1 - How to Create a Media Player

During the June 16th, 2007 Indianapolis .NET Developers Association monthly meeting, I will be presenting an overview of Silverlight. In addition to the overview, I thought it might be helpful to provide a walkthrough of creating a media player using Silverlight 1.1 (the one with the .NET Framework).

In order to prepare for the presentation and provide the content to individuals after the meeting, I decided to create this webcast. Enjoy!

I apologize for the quality of the video, I'm still trying to get the webcast thing down. I wanted everything to be large enough so everyone could read the code. If anyone has some suggestions in terms of how to create a better webcast with Windows Media Encoder, please let me know. I look forward to your feedback and comments on this presentation.

Project Information
    Presentation: here
    Duration: 30:58
    Source Code: here
    Requirements: Silverlight 1.1 Alpha

Thursday, June 07, 2007

Silverlight and Halo 2

Last month, some of us played the Halo 3 beta and discussed Silverlight, I have some exciting news. I would like to party up again on Tuesday, June 19th at 9 p.m. EST to play Halo 2 and discuss Silverlight in between games. If you have an interest, please post a comment with your XBox Live gamertag and e-mail address. All comments on this blog are moderated, so I will NOT post the comment that contains your gamertag and e-mail address. I will then e-mail you giving you my XBox Live gamertag.

Also, if there is a topic you would like to discuss, please bring it along. Personally, I would like to discuss the following:
  • atypical controls that you think may be cool. By atypical, I am referring to controls beyond button, textbox, dropDownList, etc.
  • Silverlight Streaming


Also, next week I will be posting a webcast on Silverlight 1.1 so stay tuned for some real content :)

Friday, May 25, 2007

'07 Summer Tour

Hello,

June is going to be an exciting and busy month. I'm going to be presenting at a wide variety of events and if you're in the midwest geography, feel free to stop in and say "hey!".

DateLocationEventTopic
05.22.07IndianapolisDevCaresVisual Studio "Orcas" and LINQ
06.01.07 --InternalSilverlight
06.08.07LouisvilleDevCaresMicrosoft Expression
06.14.07IndianapolisIndy .NET Assoc.A Bit of Fun with Microsoft Silverlight
06.26.07IndianapolisDevCaresMicrosoft Expression


It's going to be a busy month :)

Monday, May 21, 2007

Silverlight and SharePoint Integration Contest

Michael Gannotti has posted a contest on Silverlight and SharePoint Integration.

Definately check it out, first prize is pretty impressive. Thanks goes to Corne Van Dyk for pointing this out.

Friday, May 18, 2007

Silverlight - Book

Greetings,

I am currently working on a book aimed at Silverlight 1.1. I am seeking comments from you regarding any of the following:
  • What are somethings you really like in your technical books?
  • What are somethings you really dislike in your technical books?
  • Are there any items you would really like to see in this book?

I will be posting a variety of code samples, thoughts, and other mumblings throughout this authoring endeavor.

Thanks!
Chad

Silverlight and Halo 3

If you are excited about the Halo 3 beta and would like to discuss Silverlight, I have some exciting news. I would like to party up on Tuesday evening at 9 p.m. EST to play Halo 3 and discuss Silverlight while the games are loading. If you have an interest, please post a comment with your XBox Live gamertag and e-mail address. All comments on this blog are moderated, so I will NOT post the comment that contains your gamertag and e-mail address. I will then e-mail you giving you my XBox Live gamertag.

Friday, May 11, 2007

Silverlight - Upgrading from WPF/E

Hello!

I was in the process of working on a project when I noticed some fairly significant changes from what I was used to. All-in-all, I like the changes. However, I only liked them once I found some documentation explaining the changes :)

If you have been working with the CTPs prior to the 1.0 beta release of Silverlight, I would really recommend reading the following articles prior to your development endeavor.

Both of these are very valuable reads! Enjoy.

Saturday, May 05, 2007

Silverlight - Samples updated from WPF/E

Hey Readers!

I have completed updating all of the samples that have been on this blog from WPF/E to be compliant with Silverlight 1.0 Beta. Here is a list of the updated samples
The GeoPhoto control is being converted from user control to something more valuable. I hope to have it completed very soon. Please watch this blog for more information.

Additionally, if you are interested in ASP.NET user controls using Silverlight, I have written an article for Developer.com that walks through the process of a creating a very basic user control.

Silverlight - Enter the Matrix

This example is an updated version of an earlier post. For information regarding this item, please review my previous post.




Project Information
    Source Code: here
    Developed For: Silverlight 1.0 Beta

Silverlight - Movie Slider Puzzle

This is example is an updated version of an earlier post. For information regarding this item, please review my previous post.


Project Information
    Source Code: here
    Developed For: Silverlight 1.0 Beta

Silverlight - A Basic Silverlight User Control

I recently wrote an article on creating a basic ASP.NET User control using Silverlight. The article has been published on Developer.com and is available here.

However, this example is an updated version of an earlier post. For information regarding this control, I would recommend reviewing my article.


Project Information
    Source Code: here
    Developed For: Silverlight 1.0 Beta

Silverlight - MIX Bling

This example is an updated version of an earlier post. For information regarding this control, please review my previous post.


Project Information
    Source Code: here
    Developed For: Silverlight 1.0 Beta

Silverlight - How to Dynamically Load a XAML File

This example is an updated version of an earlier post. With the release of the 1.0 Beta of Silverlight, dynamically loading a XAML file is easier. Now you only have to set the "Source" property of a SilverlightControl object. For information on how it used to be done, please review my previous post.

Here is a sample that dynamically loads XAML files based upon the selected shape.


Project Information
Source Code: here
Developed For: Silverlight 1.0 Beta

Friday, April 27, 2007

Silverlight - Client Side Invasion! [in a good way]

Hello,

I haven't posted anything in a while and I wanted to write a quick message pointing out some items I've recently learned/figured out/been working on.

  • The SourceString property of the "WPF/E" object provides some VERY cool possibilities. Over the last couple of weeks, I've been working on creating an online wizard that will then generate a small JavaScript snippet that people can copy and paste to display some Silverlight content on their webpage/blog. This is really cool because it allows individuals that may not be very technical, yet know how to display a YouTube video on their webpage/blog the ability to use Silverlight content in the same fashion. This will make more sense once the wizard is posted. I have a working prototype, however I'm not making it publicly available just yet. I'm hoping that during the MIX 07 conversation, a new Silverlight CTP will be announced/released [crossing fingers]. There is currently one item that I'm looking forward to.
  • I've been writing an article for CodeGuru.com related to authoring ASP.NET user controls that host Silverlight content. This article should be published within the next week and I will write a message on this blog once it is published.

Saturday, April 14, 2007

WPF/E - How To Put VirtualEarth Content Above WPF/E Content

During the implementation of the GeoPhoto User Control I ran into a problem I had not anticipated. Please allow me to setup the problem.

A WPF/E control is rendered as an ActiveX Control, which happens to also be considered a windowed control. Within IE 5.5+, HTML content cannot be layered above windowed controls in a straight forward approach. You may have seen this in some DHTML style menus on the web. You may have noticed a menu "hiding" behind a drop down list, though you would expect the menu to be above the list. Because the drop down list is an example of a windowed control, the menu is rendered under, or behind, the drop down list.

Occasionally, you may want to present HTML content, such as integrating Virtual Earth content, on top of your WPF/E content. The previously described problem, may cause some frustration. However, don't worry, here's how to get around the problem.
  • Place your HTML content within a DIV element.
  • Define the height and width of the DIV element. This is recommendation to ensure that everything is working properly.
  • Define the top and left positions of the DIV element.
  • Create an IFRAME element that is the same height and width of the DIV element.
  • Position the IFRAME element at the same location of your DIV element.

This works because as of Internet Explorer 5.5, IFRAME elements are no longer windowed controls. Crafty.