Wednesday, December 19, 2007

Silverlight - Discussion over X-Box Live (Halo 3)

Hello!

As this incredibly busy, yet exciting year winds down, I think some fun is in order.

I would like to once again organize an open discussion on Silverlight over X-Box Live. If you would like to participate, here is some info to put on your calendar:

Who: Anyone
What: Silverlight Discussion
Where: X-Box Live (Halo 3)
When: Thursday, December 27, 2007 @ 10 p.m. EST

If you would like to particpate, please post a comment with
  1. Your Gamertag (this will not be published)
  2. Anything specific you would like to discuss regarding Silverlight
  3. Any game type preferences
Once I have received your comment, I will send you a friend invite using my gamertag. In addition, I will be trying to put together an agenda to make the time valuable and fun for everyone.

Sometime in the new year I will put together an old skool edition with Halo 2.

Merry Christmas,
Chad

Thursday, December 13, 2007

Silverlight - Presentation

Hello,

I presented on Silverlight 1.0 and Silverlight 2.0 (previously 1.1) this evening. The presentation was given at the Kentucky .NET Developers Association meeting. As promised during the meeting, my slides are available here.

Overall, I was really encouraged to see the excitement swirling around Silverlight. The content in the presentation is slightly modified from the presentations I have given in the past. Regardles, there is one thing that I feel I need to reiterate to those who are just reading the slides.

As Tim Sneath has mentioned in his recent post, Silverlight 1.1 is not ready for use in production.

With that said, I hope to turn the content of the presentation into a webcast in the near future. This will allow those outside of the locations I've spoken at to see the content. When this occurs, you can bet I will make a post here. Because of this, make sure you are subscribed to the RSS Feed.

Friday, November 30, 2007

Silverlight - Updates

  • On November 29, Scott Guthrie announced that Silverlight 1.1 will now be known as Silverlight 2.0. This is really exciting news. I think it will really help clear up some of confusion that is currently surrounding 1.0 vs. 1.1. Because of this...

  • May the book title Silverlight 1.1 in Action rest in peace. However, this does not mean the book is cancelled. Oh no! Instead it is being appropriately named:

  • Silverlight 2.0 in Action. The book cover and information will be updated to match the new title shortly. When this book is in your local book store, it will have been in development for over a year. That is a pretty long time for a technical publication. This should be a hint as to breadth and depth of content you should expect. Because of this, I think there will be a number of individual who will want to discuss the content. To help assist in this, I would like to announce the
  • Silverlight 2.0 in Action Facebook Fan Page. Become a fan today (man I get cheesier each and every day, just ask my girlfriend's dog, Buster):

Wednesday, November 21, 2007

Silverlight - The Interview

Larry Clarkin and Dave Bost are two of Microsoft's evangelists in the midwest area. They have started a new site called "The Thirsty Developer".

As it turns out, they were nice enough to discuss with me the Silverlight presentation I gave at the IndyTechFest. They have since posted the interview here. I should warn you that you will need to have QuickTime (Where's the 'Light :)).

I'm fairly happy with how the interview went. This was my first time doing this kind of thing, and because of it, I do not feel I got the point across I was going for. I wanted to be more explicit in stating how one of the really great things about Silverlight 1.1 is it's ability to work with data and communicate over the internet. Because of this, I feel that Silverlight provides some extremely valuable offerings even if you do not have a need for a rich visual experience. For instance, you could use Silverlight to simply work with your web services, in place of JavaScript (AJAX, DOJO, etc). You can learn more about this in my book (shameless plug, I know).

On an unrelated note, Mike Harsh posted a message mentioning a "Service Release" for Silverlight 1.0. To learn more about the features, go here.

Have a Happy Thanksgiving!

Thursday, November 08, 2007

Popfly and Visual Studio 2008

Greetings,

Today I saw something that I thought was incredibly interesting.
Visual Studio 2008 is supposedly going to have a Popfly tie-in called "Popfly Explorer". If this is what it sounds like, I am SUPER excited. In fact, I haven't seen really any other blogs mention this. I think this will add a lot more excitement around Popfly and encourage even MORE mashup components. This is like taking webparts and putting them on 'roids (that's Steroids).

The full article is here.

The fact that this is being included in VS 2008 is nudging me towards adding another section in the final chapter of my book. Check out the comments on it thus far in the nice little Silverlight Streaming application in the upper right corner. Oh yeah, and the final chapter has a walkthrough related to Silverlight Streaming.

Tuesday, October 23, 2007

Free Book Chapter - Silverlight 1.1 in Action Early Adoper Open for Business!

Hello,

I am excited to announce that we have opened up early access to "Silverlight 1.1 in Action." If you have an interest in joining or pre-ordering, please click here. If you are hesitant, you can read chapter 1 for FREE through here. I feel obligate to mention that the page count is just an estimation. There may be more, there may be less. Regardless, here is my personal overview and opinions on the first two chapters.


Chapter 1
This chapter is really an overview of Silverlight and describes what I call the three "Ps" of Silverlight. In addition it provides an overview of XAML as well as a walkthrough to give you a feel for the designer / developer workflow available within Silverlight. You will need to provide you own .wmv file to get the walkthrough to work. However, I will be posting a special surprise once the full book is completed.
Personally, I feel a large majority of technical books focus on the "what" and "how", but rarely address the "why". For this reason, I wanted to address the why right off the bat. Admittedly, this chapter is not very technical (there is still a fair amount of code), however, I still feel it is incredibly valuable.
One of the questionable items in chapter 1 has been the "color" or tone. It is incredibly upbeat. Personally, that was my goal. My feelings are, if you are buying a book, you should feel good about it (as long as the content is technically correct). If you feel it is inappropriate, please feel free to post a comment on this blog.
Chapter 2
This chapter jumps right into the technical details. Throughout this chapter you will unlock the mysteries of the Silverlight plugin. This chapter will also show you how to manipulate the HTML DOM from managed code, as well as, work with managed code from script. When all is said and done, you should be able to masterfully integrate Silverlight content within your web applications. Once again, this chapter ends with a walkthrough to give you a hands on way to solidfy the chapter's content.
Personally, I originally overlooked the significance of the ability to work between the HTML DOM and managed code. However now, I view it as probably one of Silverlight's most important features. It really is that cool.


For the early adopters, let me proactively answer the question "when will the rest of the content become available?" I want to release chapters, in order. They will be released based upon the accuracy of the content in relation to future availability of Silverlight 1.1. For this reason, I cannot give you an exact date. I can tell you that there are several other chapters completed or near completed. However, because of the structure of the book, I really feel it is important to release the content sequentially.

I look forward to your comments related to the content that has been posted. The good news is, the content has not been sent to the printing press yet, so if there is something you despise, please let me know. I will review it and see if we can work something out.

I want to thank everyone that participated in the book raffle. There were 157 of you and the winners have been notified. Now, back to working on Chapter 11 of Silverlight 1.1 in Action.

Friday, October 19, 2007

Popfly info and some humor

  1. Yesterday, Microsoft announced that Popfly has officially gone Beta. In conjunction with this, the invitation approach has been removed, and you only need a Windows Live ID to use Popfly. In celebration of this, a contest for creating Popfly creations has been announced. Personally, I have been using Popfly since about May or June and I'm pretty excited about the potential surrounding it. In addition, I think it is a great tool to show to individuals when they ask about Silverlight.
  2. Dave Bost has posted the Buck Foley Speech from the IndyTechFest. Personally, I found this to be a refreshingly humorous opening to a technical event. Great Job Buck!
  3. Don't forget to sign up for the FREE Ebook Raffle!


Lastly, this blog feels like it has been a spam machine as of late. Once the "Silverlight 1.1 in Action" book is completed, I promise I will be posting some more valuable content. Thanks for reading, I sincerely appreciate it.

Monday, October 15, 2007

Silverlight 1.1 Book Raffle!

Hello,

I am excited to announce we are VERY near opening up the early adopter program for my upcoming "Silverlight 1.1 in Action" book. In celebration of this event, I have been given TEN (10) coupons for one FREE Ebook. In order to provide everyone with an interest in Silverlight 1.1 an equal chance at this content, I have decided to create a raffle, where the winners will be randomly selected on Wednesday, October 24, 2007.

In order to enter the raffle, please send an e-mail with the subject of "October 2007 - Raffle" to "chads.email.is@gmail.com". Please provide your name within the body of the e-mail. It is important that you enter the subject correctly because I will be using a script to retrieve the participating e-mails. After the winners have been drawn you will receive one e-mail. This e-mail will either inform you that you have won, or someone else has won. If you win, you will be notified and you will have 48 hours to respond. If you do not respond within 48 hours, another particpant will be selected and you will not receive the coupon.

Your e-mail address WILL be kept private. In addition, I will NOT spam you to buy the book. You will receive only one e-mail stating whether or not you have won, unless you mention in the e-mail that you would like more communication related to Silverlight 1.1 in Action.

If you do not win, don't worry, you will still have the opportunity to get the content thanks to Manning Publishing's Early Access Program. If you are not familiar with this process you can find out more here. Once the early access program has opened specifically for my book, I will publish more information on this blog.

Good luck!

Saturday, October 13, 2007

Silverlight 1.1 - IndyTechFest Presentation

Hello,

In about 2 hours, I will be presenting on Silverlight 1.1 at the IndyTechFest in Indianapolis, IN. My presentation that I am giving is available here. This presentation is ever-so-slightly different than the ones I have given in the past. During this session I am highlighting the ability to manipulate the HTML DOM via Managed Code.

Also, in relation to my book, "Silverlight 1.1 in Action", which is where the content for my presentations is pulled from, I have some EXCITING news. We will be very shortly, as in any moment now (minutes/hours/a couple of days, but not weeks), providing Early Adopter content. Once the process goes live, you can be sure that I will post more detailed information on this blog about how you can access this content. So make sure your RSS readers are up-to-date :).

I have to say, I have been VERY impressed with the IndyTechFest event. There are approximately 500 software development professionals at this event. The breadth, depth, and quality of presentations has been phenomenal. We even had a surprise visit by Buck Foley. This motivational speaker gave us his unique, and highly entertaining perspective of the topics being presented today. If you're doing an event, I think he does an excellent job of meshing technology and humor and his website is available here: http://www.buckfoley.com/.

Sunday, September 16, 2007

Silverlight 1.1 - October Speaking Events

Hello,

I have updated the Silverlight Events Wiki to show 2 upcoming events that I will be presenting at.
If you are in the Midwest area and have heard me present before, I would like to point out that these two presentations are going to present a VERY fast overview of Silverlight, however the majority of the time will be spent discussing the AWESOME potential for using the ASP.NET Futures to display Silverlight content, and one of the features that is one of my personal favorites, the ability to manipulate the HTML DOM via MANAGED CODE!

If you have the opportunity to join us, I hope you will. If you cannot, I will be posting my notes on this blog.

In addition, I felt I should inform everyone that my book (Silverlight 1.1 in Action) is coming along nicely. So far I am VERY pleased with the content and structure. I need to smooth out the transitions and content in chapters 1 and 2, however, after these chapters, I feel everything else is very smooth.
In order to proactively answer the question "when will it be available?", well, I cannot say. However, I can say that ultimately it depends on how stable the next Silverlight 1.1 public bits are. Once the 1.1 bits become available I will need to re-check the manuscript to ensure that the content is technically accurate and all of the code examples work.

I am writing A LOT of code examples, which will be made publicly available with the book. My goal with this book is not necessarily to be the first Silverlight 1.1 book (though that is definately a goal to shoot for), I am more focussed on being the first complete and accurate Silverlight 1.1 book.

Please let me know if you have any questions.

Thursday, September 06, 2007

Silverlight 1.1 - Controls!

In all of the hype of yesterday’s big announcement around the official release of Silverlight 1.0, something very exciting seemed to get lost in the mix. As it turns out, if you download the Silverlight 1.1 Alpha September Refresh there are some input controls! The refresh includes:

  • Button
  • RepeatButton
  • ListBox
  • ScrollBar
  • ScrollViewer
  • Slider

In addition, there is a little sample page that has all of the controls (screenshot below). Personally, I appreciate the non-operating specific default look of the controls, however, I sincerely hope that the finished versions of these controls have a little bit more sex appeal by default. Please!

Monday, September 03, 2007

Silverlight 1.1 - KY - Day of .NET Presentation

Hello,

On this past Friday, I organized and presented at the KY - Day of .NET. Overall, it was a great event and I am very happy with the participation from the attendees, organizers, representatives, speakers, and sponsers. Thank you so much.

As requested, the presentation I created can be downloaded from here.

For those that could not attend, you may find value in this presentation as it includes some material from the first chapter of my upcoming book "Silverlight 1.1 in Action". The material shows the number of computers that Silverlight can reach and some benchmarks related to performance.

Enjoy!

Tuesday, August 28, 2007

Silverlight - Events

Adam Kinney introduced me to the very useful Silverlight Events Wiki. This is a great way to learn about and post Silverlight related events. Enjoy!

Saturday, August 18, 2007

Silverlight - August Presentations

Hello,

Over course of this summer, Jeremy Sublett and I have been organizing a "Day of .NET" event in Louisville. I will be presenting at this event, as well as, at Microsoft's DevCares event on Silverlight. The dates and links to events can be found here:

DateLocationEventTopic
08.28.07IndianapolisDevCaresMicrosoft Silverlight In-Depth
08.31.07LouisvilleKY - Day of .NETSilverlight Up The Web


I hope to see you there. Don't be shy, feel free to introduce yourself. I look forward to meeting you.

Friday, August 17, 2007

Silverlight 1.1 in Action - The Book Cover

Hello!

Today I officially selected the cover for my upcoming book "Silverlight 1.1 in Action". Here it is:



This cover is only a draft and I anticipate the "Silverlight 1.1" text will be fully exposed in the final version. The cover is consistent with Manning Publications Co. cover scheme. I specifically chose this cover because of the fact the guy is unsheathing a sword which is
  • Awesome
  • Consistent with the theme in the first chapter, which will be available on this blog fairly soon.

I hope you like it. If you would like to know more about Manning's cover approach, the information is available here

Wednesday, August 08, 2007

Silverlight 1.0 - Beta 1 to RC1 Breaking Changes

Hello,

I apologize for not having all of my samples migrated yet. I was having some difficulties and really scratching my head. As it turns out, I have pinpointed a breaking change that I do not believe is in the SDK. The breaking change is...

The width and height properties in the createObject function call must be string values, not integer values.

I had been using integer values in my samples and it caused me a bit of confusion while I was attempting to migrate my samples. I hope this post will help you avoid the same problem.

Monday, August 06, 2007

Silverlight 1.0 - How to Show a Line being Drawn

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

I apologize for the delay, my previous file hoster seems to be on the fritz. Thankfully though, it seems like the Windows Live Folder service is up an running in beta form.

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

Sunday, July 29, 2007

Silverlight 1.0 - How to show a line being drawn

Recently in the official Silverlight forum, several individuals have asked how to dynamically show a line being drawn. This post contains code that will animate a line to look just like the following:



The Silverlight model makes this type of animation very simple. Everything is handled within the XAML code. The XAML code looks like the following:


<Canvas xmlns="http://schemas.microsoft.com/client/2007"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Width="300" Height="200">
<Canvas.Triggers>
<EventTrigger RoutedEvent="Canvas.Loaded">
<BeginStoryboard>
<Storyboard Name="lineStoryboard">
<DoubleAnimation Storyboard.TargetName="mainLine" Storyboard.TargetProperty="X2" From="1" To="290" Duration="0:0:8" AutoReverse="false" />
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Canvas.Triggers>

<Line Name="mainLine" Canvas.Left="5" Canvas.Top="5" X1="0" Y1="0" X2="1" Y2="0" StrokeThickness="2" Stroke="#C0504D"></Line>

<Canvas Name="playAgainCanvas" MouseLeftButtonUp="playAgainCanvas_MouseLeftButtonUp" Canvas.Top="10" Canvas.Left="102">
<Rectangle RadiusX="5" RadiusY="5" Width="95" Height="40" Fill="#9BBB59"></Rectangle>
<TextBlock Text="Play Again" FontFamily="Verdana" Canvas.Left="5" Canvas.Top="10" FontSize="14" FontWeight="Bold" Foreground="white" />
</Canvas>
</Canvas>


The steps, which are derived from the Silverlight SDK, are as follows:

  1. Create a DoubleAnimation. In our case, we are concerned about animating the line being drawn, so the following are key attributes are set:
    • StoryBoard.TargetProperty - Set to X2 because we want to make the line grow in length.
    • From - Set this value to the default X2 position.
    • To - Set this value to the end result (290)
    • Duration - Set this value to 8 seconds just to make it easy to see the line grow.

  2. Place the DoubleAnimation inside of a Storyboard. We give the Storyboard a Name so that we can access it from the client-side code-behind file. This allows us to restart the animation through an event handler associated with the "Play Again" button.

  3. Begin the Storyboard when the Canvas is loaded. This is accomplished through the use of a Trigger



Animation will be covered in Chapter 4 of my upcoming book "Silverlight 1.1 in Action".

I want to apologize to anyone who has been trying to access code samples over the past couple of weeks. I use StreamLoad to host my code samples and they have had some problems over the past couple of weeks. Everything seems to be working better now. If the problems persist, I will look into an alternative solution.

Project Information
    Source Code: here
    Requirements: Silverlight 1.0

Saturday, July 21, 2007

Silverlight 1.1 in Action - Blend

I would like to begin this post by SINCERELY thanking everyone that posted a comment on the last post. Your comments were sincerely helpful and provided valuable insights.

After reviewing all of the comments, I wanted to provide an update with the direction that I think (no guarantees) I am going to take in regards to incorporating Blend within my "Silverlight 1.1 in Action" book.

Today, I thought of a different approach which I think is a happy medium between the two options mentioned in the last post. I believe I am going to end each chapter in the first part of the book with a section called "Blending It All Together". This section will add value by:
  • Giving readers the option of learning Blend as they progress through the book
  • Keeping the focus of each chapter squarely on Silverlight
  • Reiterating chapter contents in an interactive, optional fashion.
I'm going to play around with this to see how it works, but I'm pretty excited about it. It feels right.

Also, somebody asked, "when will the book be available?" As of right now, I have completed approximately 6 or 7 chapters. Because the book is targeting Silverlight 1.1 the availability of the book will be dependent upon the timeline of the Silverlight 1.1 release. The book is targeting Silverlight 1.1 because, this is the version that provides the powerful .NET Framework. At the moment Silverlight 1.1 is in an Alpha state so it is difficult to squarely answer the "when" question.

I want to make sure I am providing quality content that you can use. I plan on providing Chapter 1, for free, on this blog very shortly. I know this does not squarely answer the "when" question, however, if I were to give an estimate, I would say an electronic version will be available in October with a printed version being available around the February timeframe. Please bear in mind this is only an estimate.

Disclaimer: The items discussed regarding the Silverlight in Action book are merely thoughts and will not necessarily be in the final version of the book.

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.

Tuesday, March 27, 2007

WPF/E - GeoPhoto - A User Control With Fun in Mind

UPDATE - 05.06.2007 - The content of this post is no longer valid with the 1.0 beta release of Silverlight.

Greetings,

One of my hobbies is Geocaching. Because of this, I decided to keep a blog regarding my caching adventures. I wanted this blog to be very heavily focused on pictures and location to help readers connect with the locations. This seemed like a perfect opportunity to create a reusable component that would allow me to load location specific images. The control displays images and if the "swap" icon is selected, a Virtual Earth map of the location of the photo is displayed. Hence the birth of GeoPhoto.

On the WPF/E side of the ball, this component is interesting because it demonstrates some very powerful, and valuable, techniques including:
  • Displaying HTML content ON TOP OF WPF/E content. I have not seen this implemented elsewhere. Everything else I have seen involves displaying WPF/E content on top of HTML content
  • Exposing ASP.NET user control properties to client (JavaScript) code
  • A fairly smooth slider "control".
  • Converting data from an XML file into JavaScript objects that are used throughout the application.
  • Creating a TRUE User Control in that you can actually use it several times on the same page.

This control reads the image: source, latitude, and longitude values from an xml file. The xml file location is actually exposed as a property of the user control. This control allows you to do the following:
  • Define the source of a picture and it's latitude, longitude
  • Define a latitude and longitude for a group of pictures
  • Define picture groups for multiple locations.

Please bear in mind, this control can be expanded upon to be more robust. This was primarily designed to be used for a specific case, and then I expanded it to be a bit more reusable, then I decided to share it through my blog. I hope you find it useful. There are several items that can definately be improved upon. One item is I would like to utilize the Downloader object more. Another one of these items is the fact that the control currently doesn't work in Firefox. I believe there is a bug in the Feb CTP that does not allow the SourceElement of a WPF/E control to be accessed when attempted through Firefox. I have posted a question on the forum regarding this. I hope to find some time to remedy this, and if so, I will definately make a post about it (so make sure you use the RSS subscription :)).

Over the next couple of weeks, leading up to MIX '07, I intend to write some more detailed posts regarding some of the points listed above. These posts will be based on the GeoPhoto control, and now is as good as time as any to make this control available. I look forward to your comments.

Project Information
    Source Code: here
    Requirements: WPF/E February 2007 CTP

Monday, March 19, 2007

WPF/E - How to get the id of the hosting WPF/E control

UPDATE - 05.06.2007 - The content of this post is no longer valid with the 1.0 beta release of Silverlight.

The February 2007 CTP of the WPF/E SDK provides the "GetHost" method which enables ANY UIElement to get the hosting WPF/E control of the object. Unfortunately, there is not a property or method that exposes the ID of the WPF/E control (as of the Feb 2007 CTP). In the event you are attempting to create a reusable component, you will probably want the ID of the control so that you can reuse all of the JavaScript you have laboriously authored :)

After reviewing the items available through the WPF/E control API, I settled on an approach that seems usable. I used the SourceElement property when I declared my WPF/E control. Click the button below to display the WPF/E control information.

The key item to notice is that these are two seperate instances of the same xaml file. The source code for this implementation is available at the end of this post.

I simply declared the WPF/E control in the HTML as follows:

<div id="wpfeControl1Host">
  <script type="text/javascript">
    new agHost
    (
      "wpfeControl1Host", // hostElementID (HTML element to put WPF/E control into)
      "wpfeControl1", // ID of the WPF/E ActiveX control we create
      "400", // Width
      "400", // Height
      "white", // Background color
      "wpfeControl1", // SourceElement (name of script tag containing xaml)
      "plugin.xaml", // Source file
      "false", // IsWindowless
      "30", // MaxFrameRate
      null // OnError handler
    );
  </script>
</div>

Notice the relationship between the "ID of the WPF/E ActiveX control", the "SourceElement" property, and the
id of the containing "Div" element. The relationships are as follows:
  • The "SourceElement" is set to the ID of the WPF/E ActiveXControl
  • The "hostElementID" is set to the "SourceElement" + a unique number to identify the instance
  • The "id" of the "div" tag is set to the "hostElementID". I point this out simply because if you are using this as a checklist you can just go down the list.
This naming structure is implemented to give us the flexibility of obtaining BOTH the id of the WPF/E ActiveX control and the id of the hosting element from the JavaScript. Now that we have setup the relationships we can obtain the various
IDs.

Using the "WPF/E JavaScript Application" Visual Studio 2005 Template asa basis, simply replace the "handleMouseUp" function
with the following:

function handleMouseUp(sender, eventArgs)
{
  var gradientStop1 = sender.findName("gradientStop1");
  var gradientStop2 = sender.findName("gradientStop2");
  gradientStop1.offset = 1;
  gradientStop2.offset = .403;

  // Obtain a reference to the WPF/E control
  var wpfeControl = sender.GetHost();
  var displayString = new String();

  // Display the ID of the ActiveX (WPF/E) control
  displayString += "The ID of the ActiveXControl is " + wpfeControl.SourceElement + "\n\n";

  // Display the ID of the HTML element that is hosting the control
  var hostingElementID = wpfeControl.SourceElement + "Host";
  displayString += "The ID of the Hosting HTML element is " +   hostingElementID + "\n\n";

  // Display the HTML of the "control" for the sake of proof
  if (document.all)
  {
    var hostingElement = document.getElementById(hostingElementID);
    displayString += "The HTML of the \"control\"\n";
    displayString += "-------------------------------------------";
    displayString += hostingElement.outerHTML;
  }
  alert(displayString);
}

I settled upon this approach primarily because it worked :). However, I was originally led down the path because of the comment in the HTML file that states "// SourceElement (name of script tag containing xaml)". I think the confusion is because of there seems to be a discrepency between this comment and the contents of the information within the SDK for the "SourceElement" property. I look forward to your comments.

Project Information
    Source Code: here
    Requirements: WPF/E February 2007 CTP

Saturday, March 17, 2007

Misc - New Layout

I came to the decision that I didn't like the appearance of my blog. Thus, I decided to move forward with a redesign. In selecting a design, I wanted to make the following improvements that I felt were lacking from the previous version.
  • Improved Readibility - The font is now larger, more distinct, and clearer
  • Focus on Content - WPF and WPF/E can more easily standout as the focus of a blog post now
  • Community Involement - Links are now available to those sites that are directly related to this blog's content. Including blogs that link to this site and other resources. In addition, I registered for feedburner to help guauge reader interest level. So if you are already a subscriber, I would appreciate it if you update your rss feed url through the "Subscription" link on the right side of the page.
  • Flexibility - I would like to incrementally include WPF/E content into this blog.
  • Navigation - Personally, I ran into difficulties finding content on my own blog. The use of the hierarchy control has simplified this process.


I hope you like the new design. I hope to have some new .NET related content posted soon.

Sunday, March 11, 2007

WPF/E - MIX Bling

UPDATE - 05.05.2007: The content of this post is no longer valid with the 1.0 beta release of Silverlight. The updated post and source code can be found here.

Hola! I'm getting pumped for Mix and I haven't seen a lot of bling out on the web yet. So I decided to add my 2 cents to the mix (no pun intended).

I've posted the code and this can be easily extended to implement some functionality with the buttons to make this a full blown media player. In fact, this component was created to host a 320x240 video. Originally, I wanted to display this component horizontally instead of vertically, which is why the borders are a little messed up. The source code available for download is actually the horizontal version so the borders of the device look better. Enjoy!

Project Information
    Source Code: here
    Requirements: WPF/E February 2007 CTP

Wednesday, March 07, 2007

WPF/E - How to Create a Media Player

[Spoiler Alert] - This content will be presented at the Kentucky .NET User Group on March 8th, 2007 [/Spoiler Alert]

During the March 8th, 2007 Kentucky .NET User Group meeting I will be presenting an overview of WPF/E. In addition to the overview, I decided it would be helpful to provide a walkthrough of creating a media player to familiarize individuals with the platform.

While I was practicing presenting, I decided to record my presentation and try my hand at my first webcast. If you decide to watch the webcast, I would recommend waiting for the video to be 10% downloaded before clicking the "play" button. I apologize for the inconveniance, however, my presentation has a time limit and I was trying to focus on a lot of the core features of WPF/E. I will try to blog on an intelligent download/playback handler sometime in the near future. Please let me know if you have any questions.

Project Information
    Presentation: here
    Duration: 44:23
    Source Code: here
    Requirements: WPF/E February 2007 CTP

Saturday, March 03, 2007

WPF/E - How to dynamically load a XAML File

UPDATE - 05.05.2007: This content of this post is no longer valid with the 1.0 beta release of Silverlight. The updated post and source code can be found here.

Recently on the WPF/E forum someone was asking about how to dynamically load a XAML file. This post will explain how to accomplish this.

One of the great features of WPF/E is the fact that it is consistent with an established web architecture. At a high-level overview, within a webpage, a WPF/E component is hosted within an HTML element and you can use JavaScript to interact with the XAML content.

When working with XAML within the web architecture, it is important to remember both the Document Object Model (DOM) and the WPF/E Object Model.

Now let's get into the details of how to solve the problem of dynamically loading a XAML file. This really cool part is that we can do this in three easy steps.

  1. Reference the WPF/E control via the Document Object Model (DOM).
    var wpfeControl = document.getElementById("wpfeControlID");
     
  2. Use the "Source" property of the WPF/E control to specify a XAML file.
    wpfeControl.Source = "pathToXamlFile.xaml";
     
  3. Reload the content of the WPF/E control with the contents of XAML file referenced by the "Source" property.
    wpfeControl.Reload();
For larger xaml files, it's generally recommended to use the Downloader object to enhance the user's experience. Here is a sample that loads a different .xaml file based upon the selected item. In addition the code for this sample is posted below. Thanks alot!

Project Information
Source Code: here
Requirements: WPF/E February 2007 CTP

Friday, February 16, 2007

WPF/E - Movie Slider Puzzle (Take 2)!

UPDATE - 05.05.2007 - The content of this post is no longer valid with the 1.0 beta release of Silverlight. The updated post and source code can be found here.

I decided that I wanted to play with the following WPF/E elements/features:
  • MediaElement
  • Clip
  • Drag and Drop functionality
  • The Downloader object
In the process I created a slider puzzle whose pieces are based upon a video! A sample of the project and the source code is available below. Please be patient as it may take a couple of minutes to download the video. You will know that the video is loaded when the playback buttons are positioned below the play surface. The video provides the following functionality:
  • Play/Pause
  • Stop
  • Re-scatter the pieces
  • Order the pieces in case you grow impatient :)
The project works by taking the video and measuring 9 pieces. Then, the video is loaded 9 separate times, one for each piece, which is defined as a Canvas. This is necessary because you can't actually cut up a video. This reveals the power of the "Clip" property. Each piece contains a clip that is the size of the piece. After the clip is in place, some good old-fashioned mathmatical calculations are used to define how to offset the position of the video within the canvas. If you look in the code, you'll notice that we use negative values to define the Canvas.Left and Canvas.Top proerties of the MediaElement. This positioning, in conjunction with the previously defined Clip, define what part of the video is visible to the user.

I look forward to your comments. This example can be improved upon, but I'm pretty excited about it. Enjoy!

Project Information
Source Code: here
WPF/E Runtime: Febuary 2007 CTP

Tuesday, February 13, 2007

WPF/E - The Matrix Reloaded

Bryant has taken the Matrix example and really polished it up. You can see the new and improved version here.

Great work Bryant!

Tuesday, February 06, 2007

WPF/E - How to Animate your Name!

Hey Readers...

During my undergraduate career I studied computer science. I was looking to expand my knowledge into working with some technologies that were closer to the user experience. Because of this, I took a Flash class in another department. One of the required projects was to create a basic animation that would animate our name. At that time, the movie "The Matrix" was pretty big, so I used that as the premise for the animation. I'm sure you've all seen it.

I decided to take that animation and re-create it using WPF/E. My main focus was I wanted to see how efficient the JavaScript was while attempting to "animate" (please note, I'm not using the WPF/E Animation, rather animation via JavaScript) several items. The code for this project is available here. It would definately have been more savvy to let the JavaScript generate the textblocks. However, I wanted to see how the technology would perform with the manipulating each textblock individually. I was very happy with the result.

If you have any questions about the code, please feel free to post a comment. In addition, I have some ideas for some other types of controls I would like to post over the next couple of weeks, so stay tuned! Now, here is the little name animator. Enjoy!





NOTE: This code was written with the WPF/E Febuary 2007 CTP

Monday, February 05, 2007

WPF/E - How use drag and drop

One very important feature of rich internet applications is the ability to implement drag-n-drop. Lorin from the WPF/E Developer Content Team has posted a great walkthrough of how to implement drag-n-drop within WPF/E. In addition, there is a demo application.

Personally, one of the cool features that I noticed was, if you drag and drop the sunglasses on the dog, you can still see the dogs eyes. I really appreciated the fact that the sunglasses utilized other WPF content instead of just using a bitmap. It demonstrates how powerful the platform is.

Wednesday, January 31, 2007

WPF/E - Febuary CTP & SDK Released!

Microsoft has released the latest WPF/E CTP. You can download the Windows version from here and the Mac version from here.

You may download the SDK from here. In addition, the online reference for the SDK may be found from here.

MSDN Forums - Achievement(s) Unlocked

Hello!

One of my goals for this blog and the community for 2007 was to be more active in the forums. At the end of the first month of 2007, I noticed that I managed to land in the top 10 on both the WPF and WPF/E forums! Keep the questions coming!






P.S. I believe they are getting ready to release the next WPF/E CTP. I tested viewing this post and the following error appeared. I'll put a post up when its out.

Monday, January 22, 2007

WPF/E - A basic WPF/E User Control

UPDATE - 05.05.2007 - The content of this post is no longer valid with the 1.0 beta release of Silverlight. The updated post and source code can be found here.

Recently, I wanted to learn about WPF/E so I created an ASP.NET User Control that takes the images from a specified directory and rotates through them and displays their reflection. I will admit, this posting is a bit light on pure information, however, I still wanted to share what I learned and the code I wrote. If you have any questions, please post a comment and I will be glad to answer them. (you can get the source code here):

I am not saying this is the best how-to on this type of thing, in fact, there are several improvements that can be made to the implementation. Rather, I created this as a proof-of-concept for myself, so I thought I would share what I learned along the way.
  • I was pretty impressed with the ease in using this technology. If you are familiar with JavaScript, you are going to find it easy to work with WPF/E. A long time ago, I learned ActionScript. It's mediocre, but personally, I would rather work with a widely used language such as JavaScript when developing. I'm very thankful the WPF/E team decided to use JavaScript instead of trying to develop some other new scripting language.
  • I really appreciated the fact that because WPF/E is in open text platform (it uses xml and JavaScript), the installation requirements fall on the client side. This was great because my hosting service doesn't have .NET 3.0 components installed, yet I was still able to deploy this sample.
  • I actually used the Microsoft Expression Blend Beta 1 for the graphics implementation. I was extremely pleased to see that I had to make ZERO changes to the xaml in order to get it to work within WPF/E. Very slick.
  • I had some difficulty deploying the application because the .xaml MIME type was not registered correctly on the hosting server. I do not own the server so I could not see what had happened. Shawn Wildermuth pointed out that sometimes you can have success deploying an application by using the .xml extension in place of .xaml. This is useful if you are having difficulty in getting .xaml registered as a mime-type. This little tip allowed me to get the WPF/E control you are seeing above deployed.


I plan on presenting on WPF/E in the Louisville, KY and Indiana geographies over the next couple of months. So if you're in the area and interested in this technology, please view the user group websites for more information.

once again, the source code is here if you would like it.

P.S. I just made the cut-off for my one-a-week posting goal by 27 minutes :)

Sunday, January 14, 2007

WPF - What's the difference between XBAPs and WPF/E Applications?

I was recently trying to determine what the differences are between XBAPs and WPF/E applications. At first glance, they are both browser based solutions, so I was wondering about what the potential catch was. If you (the reader) have/know of any more please let me know and I will gladly update this posting. At this point, this is a list of some of the core items I've found:

  • WPF/E Applications
    • Are cross-platform ready (Mac OS X and Windows)
    • Do not require the client to have the .NET 3.0 runtime. Instead, WPF/E applications run within a browser plugin.
    • Do not support code-behind
    • Rely on JavaScript

  • XBAPs
    • Require the client to have the .NET 3.0 runtime components installed.
    • Are not cross-platform enabled. They will only run on Windows machines.
    • Support code-behind
    • Must run within IE (or use the IETab plugin for Firefox)


In my personal opinion, In general, I intend to use the technologies in the following environments:
WPFXBAPsWPF/E
Desktop solutionsIntranet ApplicationsInternet Applications
Organization specific gadgetsGeneral purpose gadgets

In general, WPF/E provides a more portable solution while currently sacrificing some of the functionality that XBAPs provide. In addition, XBAPs provide a slightly better developer experience simply because debugging JavaScript code can be somewhat tedious in comparison to debugging some code-behind pages.

How do you intend to use these technologies? I look forward to your comments.

Saturday, January 13, 2007

Misc - Major Discovery!

According to the Superhero Personality Quiz I am Spider-Man!


Spider-Man80%
Superman65%
Hulk60%
Batman50%
Robin50%
The Flash45%
Green Lantern45%
Iron Man45%
You are intelligent, witty, a bit geeky and have great
power and responsibility.
Spider-Man!


I won't count this as my post per week :)

Sunday, January 07, 2007

WPF - How to distinguish a Grid from a Table

Recently, while perusing the WPF reference documentation, I noticed that WPF provides both a Grid and a Table control. I was very interested in comparing and contrasting the two as initially, I believed the two were almost synonymous. However, neither control provides the complete functionality of the other. This posting will help you learn how to distinguish between a Grid and a Table. Alot of this information is available from the Grid definition page on MSDN.

A Grid provides the following features over the Table:


  • Element can be inserted by row and column indexes.
  • Content can be layered within a single cell.
  • Children can be relatively positioned to an upper-left corner of a cell

A Table provides the following features over the Grid:
  • Built-in support for paging
  • Built-in support for table headers
  • Built-in support for table footers.

Essentially, a Grid is used for Layout and a Table is used Data. If you know of other differences, please post them in the comments and I will be glad to update this post.

Monday, January 01, 2007

Cornucopia 2007

Happy New Year!

I wanted to set some expectations for this blog in the upcoming year as well as some of the goals I am shooting for.

  • At least one post per week.
  • Be more active in the WPF Forum
  • If Visual Studio "Orcas" is released this year, I would like to present to "How-to" videos throuh this blog.
  • Complete a useful XBAP component
  • Create an entire site utilizing WPF/E

It's going to be a busy and exciting year!