Advertisement

The Underground at PDC

PDC is coming…it’s only a few weeks away.  Are you going?  I am and I couldn’t be more excited.  I’m coming in Sunday and helping with a workshop on Monday.  Then the rest of the week will likely be a blur.

If you are going (and even if you aren’t), there is one party you will not want to miss.  Last year "The Underground @ PDC” was a great party and gathering of geeks.  The Gu, Scott Guthrie, was there.  As was Don Box and Scott Hanselman dishing out the geek humor and flames toward one another.  It was great.  And the venue for the after-geekiness was amazing…one of the coolest pubs/bar/whatever I’ve been to.

Well, it’s back.

Underground at PDC logo

This year it’s at a place called the Conga Room, which looks to be a latin fusion kind of place.  If there is a Buena Vista Social Club-like band or any form of Mariachi, you might not be able to pull me away. 

The Gu is on the agenda as well for this party.  The best part about this party: FREE.  The only catch – you need an invitation code.  I’ve got one at the bottom of this post.

This event/party is being provided by one of the evangelism teams at Microsoft.  Last year I had a great time mingling with folks and seeing a bunch of live podcast interviews going on with some of the names you’d recognize in the geek world.  It was a blast.  This year promises to be no different. 

You don’t have to be a PDC attendee to go to the party…if you are a SoCal developer and couldn’t make it to PDC, this is for you – you simply have to register.  If you can make it (please don’t register ‘just because’) – visit the registration site and use the RSVP code: arpile.  This code is good for a limited amount of registrations…once it’s gone, it’s gone.  This code is at it's maximum registrations.  Follow UndergroundPDC on Twitter where they will be giving out more codes.  I’ve heard about a very cool special surprise that will be there too – can’t say anything though – I’ll be uninvited…and I don’t want that.

I hope to see you at PDC and at The Underground @ PDC!


This work is licensed under a Creative Commons Attribution By license.

Grouping data in a Silverlight DataGrid

I previously wrote about DataGrid grouping using the declarative model of adding GroupDescriptors.  Unfortunately that feature (the declarative part) never made it to the release of Silverlight 3.  It was pointed out to me that I should update that post and it has been on my //TODO list for a while.  Here’s an update…

First, I’m still using a sample data class of Person as my test data:

   1: using System.Collections.Generic;
   2:  
   3: namespace DataGridGroupingUpdated
   4: {
   5:     public class Person
   6:     {
   7:         public string FirstName { get; set; }
   8:         public string LastName { get; set; }
   9:         public string Gender { get; set; }
  10:         public string AgeGroup { get; set; }
  11:     }
  12:  
  13:     public class People
  14:     {
  15:         public static List<Person> GetPeople()
  16:         {
  17:             List<Person> peeps = new List<Person>();
  18:             peeps.Add(new Person() { FirstName = "Tim", LastName = "Heuer", Gender = "M", AgeGroup = "Adult" });
  19:             peeps.Add(new Person() { FirstName = "Lisa", LastName = "Heuer", Gender = "F", AgeGroup = "Adult" });
  20:             peeps.Add(new Person() { FirstName = "Zoe", LastName = "Heuer", Gender = "F", AgeGroup = "Kid" });
  21:             peeps.Add(new Person() { FirstName = "Zane", LastName = "Heuer", Gender = "M", AgeGroup = "Kid" });
  22:             return peeps;
  23:         }
  24:     }
  25: }

Then my XAML is a simple DataGrid (make sure to add assembly references to your project to System.Windows.Controls.Data):

   1: <UserControl x:Class="DataGridGroupingUpdated.MainPage"
   2:     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
   3:     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
   4:     xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
   5:     xmlns:datacontrols="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data"
   6:     mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="480">
   7:     <Grid x:Name="LayoutRoot">
   8:         <StackPanel>
   9:             <StackPanel Orientation="Horizontal">
  10:                 <TextBlock Text="Group:" Margin="0,0,10,0" />
  11:                 <ComboBox x:Name="GroupNames" SelectionChanged="GroupNames_SelectionChanged">
  12:                     <ComboBox.Items>
  13:                         <ComboBoxItem Content="AgeGroup" IsSelected="True" />
  14:                         <ComboBoxItem Content="Gender" />
  15:                     </ComboBox.Items>
  16:                 </ComboBox>
  17:             </StackPanel>
  18:             <datacontrols:DataGrid x:Name="PeopleList" />
  19:         </StackPanel>
  20:     </Grid>
  21: </UserControl>

Notice the xmlns:datacontrols declaration at the top.

Now since we can’t do the grouping declaratively as in my previous sample with Silverlight 3 beta, here’s how we could do it.  In Silverlight 3 you have access to PagedCollectionView (add a reference to System.Windows.Data to get it).  This is a view that enables you to add sort and group descriptors.  In my initial loading code I instantiate a new PagedCollectionView passing in my List<Person> as the enumerable type.  I then set a default grouping on it.

   1: PagedCollectionView pcv = null;
   2:  
   3: public MainPage()
   4: {
   5:     InitializeComponent();
   6:     Loaded += new RoutedEventHandler(MainPage_Loaded);
   7: }
   8:  
   9: void MainPage_Loaded(object sender, RoutedEventArgs e)
  10: {
  11:     pcv = new PagedCollectionView(People.GetPeople());
  12:     pcv.GroupDescriptions.Add(new PropertyGroupDescription("AgeGroup"));
  13:  
  14:     PeopleList.ItemsSource = pcv;
  15: }

Then I can wire up a quick and dirty (just for demonstration purposes) ComboBox to show changing the grouping (or perhaps adding another one if you’d like):

   1: private void GroupNames_SelectionChanged(object sender, SelectionChangedEventArgs e)
   2: {
   3:     if (pcv != null)
   4:     {
   5:         // comment this next line out to see
   6:         // adding additional groupings.
   7:         pcv.GroupDescriptions.Clear();
   8:         ComboBoxItem itm = (ComboBoxItem)GroupNames.SelectedItem;
   9:         pcv.GroupDescriptions.Add(new PropertyGroupDescription(itm.Content.ToString()));
  10:     }
  11: }

You see we are just changing the PagedCollectionView and not the DataGrid.  The binding that exists between them already understands what to do – so we just have to change the data source, not the control displaying the source.  Put them all together and the running application shows the grouping:

DataGrid grouping sample image

Hopefully this helps clarify the change from SL3 beta and apologies for the delay in updating what is a common sample request.  Who knows, maybe in future versions the declarative model will come back :-).  Here’s the code for the above if you’d like to see it: DataGridGroupingUpdated.zip


This work is licensed under a Creative Commons Attribution By license.

Microsoft Store – engaging with consumers directly

Standard caveats apply: I’m a Microsoft employee and fanboy.  I’m not ashamed.  I will say though when the announcements of the Microsoft retail brick-and-mortar stores opening, I was skeptical…no doubtful.  I kept (and still do a bit) thinking to myself how are they going to compete with the likes of Best Buy and others?!  Nonetheless, I waited patiently to see the plans.

I wouldn’t have to wait long as the first store opened up in Scottsdale, Arizona, USA.  Scottsdale is a neighboring town in the sprawl we call “Phoenix” (it’s about 40 mins from me in the QC).  When opening day came around, surely nobody would be there right?  Wrong.  Call them fanboys, eager folks to get tickets to the concert that night for their kids, whatever…but there were folks camped out.  And the lines were amazing.  The opening was an amazement to me of buzz and excitement from what I could tell.  4 days later I took the chance to go out there and take a look.

Microsoft Store EntranceI first saw a front entrance that didn’t display ‘old school’ Microsoft.  A subtle logo twist on the Windows logo (perhaps too subtle?  will people know) greets the header of the entry way.  Yes, it feels very Apple store-ish.  Naysayers flame away: copycat, blah blah.  So what…if you want to be successful, do you ignore what already has been successful?! No.

The store from the outside is very bright and clean.  Other than what are perhaps load-bearing pillars, floor-to-ceiling glass is in the entire front entry way.  When you walk in you’re greeted by some newly christened Softies (yes, they are full Microsoft employees…I see them in the GAL).  Each employee is wearing different colored shirts.  I’m assuming red means some type of supervisor or senior person.  I saw the manager, Cheryl, whom I’d been debriefed on earlier in the year.  The store was packed and I didn’t think it’d be appropriate to chat her up (aside from the fact my kids were yanking down all the Zune HDs from their docks).

Microsoft Store Crowd

I was approached by an associate who asked if I needed anything.  I identified myself as a fellow Microsoft employee and he asked me what team.  Silverlight, I told him.  Immediately he knew what that was and replied that he’s learning it right now coming from the Flash world as an animator.  Wow.  A retail clerk knowing Silverlight?!  We chatted about he Zune HD as I’d not seen them yet (one locked up on me while playing with it, which was weird). 

Microsoft Store laptop sales (dell adamo)I wandered around and was amazed at the laptop availability from all the major players: Dell (man that Adamo is sweet), Toshiba, HP, Sony, Acer, Lenovo, etc.  And all form factors: huge touch screens to netbooks.  I’m not sure how well they are priced, but the 13” Adamo was listed there at $1400.  Based on the sales figures I heard from one employee on the first day laptop sales, they were clipping along really well – people are actually buying stuff there!  I couldn’t tell for sure, but it looked like the machines purchased in the store were decrapified.  At least on the Dell’s I messed around with, the typical crapware was not installed – could have been a demo station thing, not sure and I didn’t ask.  The presentation of the machines and Windows 7 was well done though.

What amazed me was the conversations being had.  I heard more times from customers Oh, I didn’t know that.  The employees I saw engaging weren’t stumped.  These were very well prepared employees from what I could tell, accurate in information and confident in their replies to customers.  Solid.

Microsoft Store SurfaceSurface was a clear hit in the store.  There were four of them that I could tell, two “standard” ones that you see everywhere and 2 that were encased in a nicer presentation and at chest/bar level.  Perhaps this was so that adults could actually get a use on them.  The two others had a constant flux of kids in them playing the games (they were loaded up with all the demos in the world).  Seeing people interact with Surface was pretty cool – very little instruction needed other than “it’s a touch machine” – and people seemed to find it very intuitive.

There was also an “answer bar” in the back.  Yes, mock if you will the familiarity with the Apple genius bar.  Who cares, it’s the right thing to do.  There was a screen showing the appointments upcoming and it was pretty active.  I even saw someone bring in their XBOX for the red-rings-of-death fix.  Heck that alone could make the stores valuable :-).  Most people were there to understand Windows XP upgrades to Windows 7 it looked like to me.  Behind the answer bar there was also a room dedicated to instruction. 

Microsoft Store learning Microsoft Store Answer Bar

A huge screen with seating so regularly scheduled classes could be given to anyone who wishes.  For the Scottsdale store, you can find the upcoming lists on the web site for the Microsoft Store.  They have things ranging from exploring Windows 7, to getting in depth with Zune and understanding Office better.  I think this will be an essential asset for the store and Microsoft and the stores should be marketing the heck out of these learning sessions.  Everywhere.

Some cool facts?  Tons of WPF applications :-).  The wall that surrounds the entire store (which is very cool and really makes the store) is a WPF application.  One of the developers reached out to me a while back to let me know about it.  It’s pretty cool.  Also is some of the product choice helper application kiosk that are in some places (touch based of course).

Microsoft Store wall

Overall, a great experience and changed my mind.  The staff is well trained, the products are presented well and people are entering in the store.  I thought Scottsdale was an odd place for the store (it is in between a Tiffany & Co. and a Barneys) given the (yes I’m stereotyping) typical Scottsdale Fashion Square crowd.  We’ll see if that crowd levels continue through the holidays. 

The one thing that I think they are missing out on for geeks is a better name for their free WiFi.  I love how Apple brands their WiFi essentially.  Microsoft’s? RETAILGUEST.  Now anyone who has been to a Microsoft conference before will know that’s typical IT naming for us, but it misses a simple, subtle brand opportunity.  How about Microsoft Store?!?!

I think the store opening so far has been a success in sales and perception.  To me, the perception is key.  Having so many people having aha moments in the store should certainly help change their knowledge of Microsoft products and dispel some myths being portrayed.  The engaging, friendly and knowledgeable staff will only help things.  I wish that I’d seen a living room setup so that Media Center/XBOX had a better showing.  I think that is one product that isn’t out there in the consumer space enough.  And since I’ve moved completely to Media Center for my TV, having a setup showing things like the HD HomeRun and Windows Media Center with XBOX as an extender could go a long way I think.  It was energizing to see the store and how it was doing.  I wish it the best of luck!  The Mission Viejo store will be opening this week (29-Oct).

Oh yeah, and not a single BSOD in the the entire store :-).


This work is licensed under a Creative Commons Attribution By license.

Silverlight Audio Player for WordPress

As a follow-up to my Silverlight For WordPress plugin, I have just deployed Mark Heath’s Silverlight Audio Player as a WordPress plugin.  Thanks to Mark for changing his license to Ms-PL so that I could make this happen.  If you are a WordPress user and want to use Silverlight for audio playback, you use some WordPress macro language (in this case slaudio) and put it in.  The rendered output is like this:

Silverlight Audio Player for WordPress (collapsed)

And when you click the play button it expands:

Silverlight Audio Player for WordPress (expanded)

Again, most of the actual Silverlight work is Mark’s, so be sure to head on over to his project to thank him or if you find issues in the Silverlight player.  I’ll update the plugin whenever a new version of the player is released.

NOTE: A lot of people ask me if I’m running WordPress on this blog because of these plugins.  The answer is no.  I run the most awesome Subtext framework here.  I do have a few other sites that I use WordPress on.

To install in WordPress, simply search for the plugin in your admin dashboard under ‘silverlight’ and you will find it listed as Silverlight Audio Player for WordPress.  I’ve tested it on 2.8.5 but should work back to 2.2.x.

Hope this helps!


This work is licensed under a Creative Commons Attribution By license.

Using Visual Studio 2010 for Silverlight development

Previously I made note of things about the release of Visual Studio 2010 beta 2 with regard to Silverlight development.  I’ve gotten a few questions about if people should start using it for Silverlight development.  Perhaps I can help provide you with the best information I can to make that decision…so here it goes.

Go-live support

Visual Studio 2010 and .NET Framework 4 both have “go-live” support as indicated in the license terms (which are available on the VS2010 download).  If you have never bothered yourself with previous go-live products at Microsoft you may not understand what that means.

In short, “go-live” means we grant permission for you to use the product (in this case tools and framework) in a production environment.  It also means that it is a supported product at that point as well.  For Visual Studio, if you plan on using Visual Studio 2010 for go-live use, email vsgolive@microsoft.com so you will be sure to get access to that support.  You should also read the go-live license terms clearly and back-up your project data before upgrading.  More information about go-live support can be found at Jeff Beehler’s blog post.

As with any software, pre-release or not, you should be aware of caveats and gotchas.  I’ve found a few that you should be a ware of and am listing them below.

Installer errors if you have Silverlight RTW (40624) on your machine

If you are a developer and have already downloaded Silverlight 3 when it released, you probably have installed the Silverlight Tools for Visual Studio 2008 already.  Now, if you never updated your tools to the later GDR (service packs) release, then you will encounter an error when installing VS2010 beta 2.  This is because the most recent Silverlight 3 release (3.040818) SDK does not install on top of the initial release (3.040624) SDK.  We know this and this should be remedied by VS2010 official release.

In the short-term, you need to perform a manual step to accommodate.  You can do one of two things:

  • Upgrade your Silverlight Tools for Visual Studio 2008 to the latest SDK and developer runtime.
  • Uninstall the Silverlight 3 SDK and developer runtime.

The second is probably the easiest if you’ve already downloaded the Visual Studio 2010 beta 2 bits.  Simply go to the Add/Remove Control Panel applet in Windows and remove the listings of Microsoft Silverlight 3 and Microsoft Silverlight 3 SDK.  Then run the Visual Studio 2010 beta 2 installer.

What about Expression Blend?

Here is one thing that will be a gotcha.  If you choose the Edit in Expression Blend action while in VS2010, and have Blend 3 installed, you will see that Blend will start but with this message:

Blend Warning 1

Despite what the message says, when you decide to go ahead and open the unsupported project file you will be greeted with:

Blend Warning 2

So there would be your first major caveat.  Your VS2010 project files wouldn’t be able to be opened by Expression Blend 3.  Now, I say this with caution because I’ve had some BASIC projects that have, and others that have not.  Essentially it isn’t ‘supported’ but this will be one of those areas where your mileage may vary.  This may cause you some slight discomfort when needing to tweak visual states or animations, among other things you may use Blend for (resource design, etc.).

Can it co-exist with Visual Studio 2008?

Yes, Visual Studio 2010 beta 2 can be installed side-by-side with Visual Studio 2008 SP1.  This is how I’m running it now and they isolate well.

What about my VS2008 Silverlight project files?

If you open an existing VS2008 Silverlight project/solution, VS2010 will prompt you to upgrade the project file.  Note that when you do so, VS2008 can no longer access that project file.  So this means that you can’t have VS2008 and VS2010 working on the same project/solution files for your Silverlight projects.

This can be a bit of a snag in larger team developments where you have eager developers to want to get started on VS2010, but some still using VS2008 on the same project.  Take caution here.  You can try some of the same methods used in VS2005/2008 days in creating separate project/solution files for the products, but it’s a risky move if the project properties aren’t right.

So what about Silverlight 2 development?

You mean Sivlerlight ‘classic’? :-)  Visual Studio 2010 does not support Silverlight 2 development.  Yes I know in a previous post I showed multi-targeting with Silverlight 2 and 3.  As it stands now though SL2 will not be a target for VS2010 development.

At this point any Silverlight 2 installed client should have been upgraded to Silverlight 3 if they were enabled for auto-update.  Silverlight 3 provides so many more improvements over Silverlight 2 that you should really encourage moving even existing applications to the latest runtime to take advantage of some features.

So can I use it for Silverlight 3 development then?

Works on my machine logoGiven the above known’s (and in general, the known issues with VS2010 beta 2 which are documented in the readme), yes you can use VS2010 beta 2 for Silverlight 3 development.  As noted in my previous post, .NET RIA Services is not yet supported in VS2010).  Again, the above issues might prevent you in your particular project, but I can say that VS2010 works well with Silverlight 3 development. 

Of course your mileage may vary depending on the types of projects, dependencies, frameworks, etc.  But I can confidently say “works on my machine.” :-)

Hope this helps.


This work is licensed under a Creative Commons Attribution By license.

Silverlight Toolkit adds DragDrop targets!

One of the cool things I came across the in the October 2009 Silverlight Toolkit release was the addition of drag-n-drop targets for some of the core controls.  Now I know you are thinking great, another drag-n-drop useless control?!? and you’d be wrong.  I’m talking about things that make it easy to do do things like moving items from one list box to another, without writing code, but with it actually doing what you expect.

Let’s take the simplest example here: ListBox and moving items from one to another.  Using Expression Blend I’ve set up my XAML to be like this:

   1: <StackPanel Orientation="Horizontal" Margin="10">
   2:     <ListBox Width="200" Height="500" x:Name="FromBox" DisplayMemberPath="FullName"/>
   3:     <ListBox Width="200" Height="500" x:Name="ToBox" DisplayMemberPath="FullName"/>
   4: </StackPanel>

Behind the scenes I have a simple class which returns an ObservableCollection<Person> and binds the results to my FromBox.  Here’s the full simple class:

   1: using System.Collections.ObjectModel;
   2:  
   3: namespace SilverlightApplication105
   4: {
   5:     public class People
   6:     {
   7:         public static ObservableCollection<Person> GetListOfPeople()
   8:         {
   9:             ObservableCollection<Person> ppl = new ObservableCollection<Person>();
  10:             for (int i = 0; i < 15; i++)
  11:             {
  12:                 Person p = new Person() { Firstname = "First " + i.ToString(), Lastname = "Last " + i.ToString() };
  13:                 ppl.Add(p);
  14:             }
  15:             return ppl;
  16:         }
  17:     }
  18:  
  19:     public class Person
  20:     {
  21:         public string Firstname { get; set; }
  22:         public string Lastname { get; set; }
  23:         public string FullName
  24:         {
  25:             get
  26:             {
  27:                 return string.Concat(Firstname, " ", Lastname);
  28:             }
  29:         }
  30:     }
  31: }

And the code for my MainPage.xaml.cs:

   1: using System.Windows;
   2: using System.Windows.Controls;
   3:  
   4: namespace SilverlightApplication105
   5: {
   6:     public partial class MainPage : UserControl
   7:     {
   8:         public MainPage()
   9:         {
  10:             InitializeComponent();
  11:             Loaded += new RoutedEventHandler(MainPage_Loaded);
  12:         }
  13:  
  14:         void MainPage_Loaded(object sender, RoutedEventArgs e)
  15:         {
  16:             FromBox.ItemsSource = People.GetListOfPeople();
  17:         }
  18:     }
  19: }

Now I want to be able to drag an item from my FromBox to my ToBox.  I could do this in code, managing my index and moving things around, etc.  Or I can use something new from the toolkit!  Adding a reference in my Silverlight application to System.Windows.Controls.Toolkit, I then add two namespace declaration in my MainPage.xaml – here’s what the full XAML looks like now:

   1: <UserControl x:Class="SilverlightApplication105.MainPage"
   2:     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
   3:     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
   4:     xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
   5:     mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="480"
   6:     xmlns:toolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit"
   7:     xmlns:mswindows="clr-namespace:Microsoft.Windows;assembly=System.Windows.Controls.Toolkit">
   8:     <Grid x:Name="LayoutRoot">
   9:         <StackPanel Orientation="Horizontal" Margin="10">
  10:             <ListBox Width="200" Height="500" x:Name="FromBox" DisplayMemberPath="FullName"/>
  11:             <ListBox Width="200" Height="500" x:Name="ToBox" DisplayMemberPath="FullName"/>
  12:         </StackPanel>
  13:     </Grid>
  14: </UserControl>

Notice the xmlns:toolkit and xmlns:mswindows in the declarations.  Now I simply wrap the ListBox controls inside a ListBoxDropTarget control:

   1: <StackPanel Orientation="Horizontal" Margin="10">
   2:     <toolkit:ListBoxDragDropTarget mswindows:DragDrop.AllowDrop="True">
   3:         <ListBox Width="200" Height="500" x:Name="FromBox" DisplayMemberPath="FullName"/>
   4:     </toolkit:ListBoxDragDropTarget>
   5:     <toolkit:ListBoxDragDropTarget mswindows:DragDrop.AllowDrop="True">
   6:         <ListBox Width="200" Height="500" x:Name="ToBox" DisplayMemberPath="FullName"/>
   7:     </toolkit:ListBoxDragDropTarget>
   8: </StackPanel>

And when I run the application I get drag-n-drop item functionality from one list to the other, complete with a semi-opaque decorator as I drag the item:

ListBoxDragDropTarget image sample

Cool.  As I drag one item, it moves to the other.  But this can do more.  What if I just wanted to re-order items within a single ListBox?  This can do it as well…after all the ListBox can be both a drag *and* drop target.  However this ListBoxDragDropTarget doesn’t work with virtualized panels (which the ListBox uses by default.  So to do this you’d have to alter your ListBox ItemsPanelTemplate to include a regular StackPanel like so:

   1: <toolkit:ListBoxDragDropTarget mswindows:DragDrop.AllowDrop="True">
   2:     <ListBox Width="200" Height="500" x:Name="FromBox" DisplayMemberPath="FullName">
   3:         <ListBox.ItemsPanel>
   4:             <ItemsPanelTemplate>
   5:                 <StackPanel/>
   6:             </ItemsPanelTemplate>
   7:         </ListBox.ItemsPanel>
   8:     </ListBox>
   9: </toolkit:ListBoxDragDropTarget>

And then you’d be able to reorder using the drag/drop behavior of your mouse:

reorder sample image

Very cool.  What’s great about this is that while I’m using simple text, you can use whatever DataTemplate you may have in your ListBox and the same functionality works…even if I added an image to my Person class and added that to the template, the functionality still works and looks great for the user:

complex template sample image

As you can see the template follows the drop.  And the drop target location doesn’t have to match the same data template!  I can have my binding in the FromBox be a complex data template, but in the ToBox only choose to bind to a single property of the class.  Nice.  Here’s an animated view of this working or click here for a live sample:

This isn’t just for ListBox elements either.  Here are the other implementations:

  • ListBoxDragDropTarget
  • TreeViewDragDropTarget
  • DataGridDragDropTarget
  • DataPointSeriesDragDropTarget

Check out Jafar’s post for some samples on the other implementations to see how helpful they can be.

So what do you think?  Good?  Hope this helps some of your scenarios with ease.  Go Toolkit!

UPDATE: Download my project I used above here.


This work is licensed under a Creative Commons Attribution By license.

A plea to my developer brethren about designer/designers

Since we appear to be in another revolution on user interface (UI) design and user experience (UX), I’ve seen a lot of people, companies, sites refer to the designer-developer workflow, including Microsoft.  Heck we’re building tools around it for Silverlight and WPF development!  One thing I see too often though is the conversation being diminished to UI only. 

I’ve heard conversations between developers saying things like yeah, now we just need a designer to make things look pretty or we take what the designer made pretty and put functionality behind it.

I have a plea for my developer brethren: please stop using the word pretty and diminishing the role a designer plays in defining UI/UX.

To me when I hear this I cringe for two reasons.  First, while I’m not a designer, I consider myself to have a strong appreciation for design and know that it isn’t easy to execute on a design for everyone.  Second I know many talented people in the design world who understand much more about how UI affects end user productivity and emotion more than just ‘making it pretty.’  So please stop, it’s insulting to the trade I think.

Imagine if you heard a conversation of designers…

Designer A: Sweet design man, I love how you anticipate the user’s next interaction and use the typography to really identify that action.
Designer B: Yeah, it took a lot of research and usability observations, but I think we got it right.  I hope the developers can finish this up so we can get it in the user’s hands.
Designer A: Totally, I’m sure they’ll finish the macros soon, I think it’s all wizard based anyway.
Designer B: Yep, I mean, I’ve created an Access application before, how hard can it be.

Yeah, see what I mean?  If you are insulted by hearing someone talking about the development craft reduced to macros and Access, then you should realize you’re doing the same thing.  Design is a craft just like software development and there are patterns and meaning to things that designers do, both in interactive design and print design.  It isn’t just about picking the right template.  Sure, palettes and animations are a part of the design, but their intent in the final design usually isn’t without thought.  Reducing a designer’s craft down to a simple “pretty” isn’t cool…at all.  And I’ve been guilty of it. 

If you want to work with a designer, then do it, but don’t hand them your finished product and ask them to make it pretty.  Make them a part of the process and have them help identify the right UI/UX for the application.  I realize it isn’t easy and sometimes isn’t possible to always have a designer, but when you have that need, just make sure you respect the trade or don’t be surprised if you get this book in the mail.  Take a moment and learn what makes good design.  For a start, watch Robby’s session from MIX08: Design Fundamentals for Developers.

I’ve got it off my chest…and I leave you with this:

Cheers.


This work is licensed under a Creative Commons Attribution By license.

Visual Studio 2010 Beta 2 and Silverlight updates

Today (19 Oct 2009) the Visual Studio team released the second beta for Visual Studio 2010 to the public.  This is a significant milestone for the team and a huge improvement over the previous beta in my opinion as a user.  As a developer, you can find out how/when you can download Visual Studio 2010 and .NET Framework 4 beta 2 from here.

After installing the tools, one thing you may notice right away is a different look of branding of Visual Studio going forward for now.  Gone is the beloved multi-colored infinity looking thing (that’s what I call it at least) and enter the updated logo.

Visual Studio 2010 brand logo

I’d encourage you to download it when you can (MSDN Subscribers can do that today, general availability on Wednesday, 21 Oct) and start playing around with it.

What’s new for Silverlight developers in VS2010?

Well, the good news is no more work around hacks to get Visual Studio 2010 working with Silverlight development!  So what happens now when you install.  Here’s my experience from a clean machine (no existing SDKs, nor any version of Visual Studio as well).

After install of Visual Studio 2010 I have this for Silverlight development:

  • Visual Web Developer
  • Silverlight 3 SDK
  • Silverlight 3 Tools (build 40818, the latest)

A few things missing here:

See below to get the October 2009 release of the Silverlight Toolkit to get all that goodness and support for VS2010.  Remember the installer for the toolkit also gives you the option to deploy the source (which you still have to unzip) which is EXTREMELY helpful in understanding how controls work in general as well as extending the controls to fit your own needs.

For .NET RIA Services, we don’t yet have a supported build for Visual Studio 2010 Beta 2.  More information on this will be coming so make sure to subscribe to my feed here for updates and watch the forums.  I’m seeing if I can work on publishing a potential work around for RIA Services users and will post an update here if I can.  UPDATE: View information about RIA Services roadmap and VS2010 from the team here.

After installing VS2010 though, you can start developing your Silverlight applications and use the editable designer surface as well.  Expression Blend will still be your friend for Visual State Manager editing and animation recording, in my opinion.

Making the designer have some better performance

For beta 2, there is a registry entry you can add (we did say it was beta right ;-)) to make the WPF/Silverlight designer perform better. 

NOTE: Editing your registry can be dangerous if you aren’t familiar with it.  It can cause wars, harm children and hurt your machine.  You’ve been warned.

To enable this, perform these steps with all instances of Visual Studio shut down:

  1. Open regedit.exe using admin permissions (on vista/win7)
  2. Navigate to HKLM\Software\Microsoft\VisualStudio\10.0 key
  3. Right-click and add a new Key named “ClrHost”
  4. In the new key, right-click and create a new DWORD32 with the name of StartupFlags
  5. Set the value of StartupFlags to 5
  6. Close regedit and use Visual Studio as you normally would

I’ve also made a reg file to make this easier.  You can download this file: Dev10DesignerFix.renametoreg and rename it to .reg and double-click it to get this entry.  I chose to force you to rename to .reg so you know what you are doing :-).  This is a step that will not be necessary in the final release version.

Silverlight Toolkit October 2009 Release

Additionally today, the Silverlight Toolkit published the October 2009 release of the bits.  Primarily this was for support of Visual Studio 2010 integration, but also includes drag-drop support for key controls as well as some charting and other API improvements/fixes.  You can read the full details of the release of the toolkit here and download the latest build.

Hopefully you all have a chance to start working with Visual Studio 2010.  I am looking forward to using the new IDE and features to help me be more productive!


This work is licensed under a Creative Commons Attribution By license.

Silverlight Live Streaming service update

Yesterday, the Silverlight Live Streaming team (SLS) posted an update on their blog regarding the future of the Silverlight Streaming by Windows Live service.

SLS was a beta service to users to have a place to host and deliver their Silverlight-based applications or media to be delivered by Silverlight players.  It was launched at the time of Silverlight 2 as a free beta service to users under the Windows Live brand and offered 10GB of free storage to beta users.

In summary, the SLS service is being discontinued.  Effective immediately no new account sign-ups are going to be permitted for the service.  Existing accounts are not going to be deleted, nor is the content at this time.  A date for final termination of the service has not yet been set and the team has stated they will provide ample time to users to get their content out of the service.

Is there a replacement, if so, what is it?

A new Windows Azure based service for hosting and delivery of similar content is planned to be launched by the end of 2009 and would be a service that SLS users might consider transferring to, however is not a direct replacement of SLS.  Windows Azure is a broader initiative for the company and this is just one service that will be offered as a part of the suite of Azure cloud services.  Windows Azure is a pay service and will have costs associated with use.

How can I get my content?

The SLS team blog post has information about how you can retrieve your content from the service.  In a nutshell, we’ve enabled the WebDAV folder support for users of the service.  This gives you the ability to map a drive to your account and move files in your file explorer utility.  The key pieces of information you will need to accomplish this is your SLS Account ID and Key.  These are different then your Live ID account you use to log into the service.  To retrieve these, log into your account at the SLS site and click on Manage Account in the SLS options on the left after logging in, like this:

SLS Account ID information

Make note of these two things.  The blog post has instructions on how you can use this information to map a network drive or network location to a WebDAV URL or share location to access your content.  I’m guessing the servers might be under some heavy load using this method so please be patient.  Remember that any authentication prompt is not looking for your Windows Live ID, but rather the SLS Account information noted above.

Summary and some FAQ

Yes, this is a bummer the service is going away as-is.  While the service was meant to stream any stand-alone Silverlight application, I know a lot primarily used it to host video content for blogs, etc. because of the web player it automatically generated. 

Q: Will the new Azure service enable video streaming and Smooth Streaming?
A: I think SLS had one of the most misleading names we’ve had on a product.  The video content on SLS was never really streaming in the technical sense.  It was always just a progressive download experience.  The Azure service details have not been completed for public detail just yet and will be announced when available as to what they will provide, costs and other details.

Q: What about the advertising platform?
A: Users who opted in and were approved for the advertising pilot with AdCenter will still have their AdCenter account information and content.

Q: When will you delete my content?
A: The final dates of discontinuance haven’t been determined and the team will give notice to all users (via the registered Windows Live ID account information/email and the blog) of timelines when they are available.  I would recommend to start downloading/saving your content now if you want it for later…this will save any mad rush to get content.

Hope this helps clarify anything but please also read the full announcement from the SLS team themselves.


This work is licensed under a Creative Commons Attribution By license.

Updated Silverlight getting started for beginners

If you’re a pro Silverlight developer, this post isn’t for you.  Just a brief update that I’ve updated some of our getting started material for beginners – those who really haven’t done anything.  These will be showing up on the Silverlight Community Site soon, but I wanted to post a link to it here first.

Getting Started with Silverlight Development is a 7-part series where I aim to do my best in trying to stuff as much as possible about Silverlight development in a simple application we develop at different steps.  It uses:

  • Navigation
  • Styles/templates
  • Data Templates
  • Data binding
  • Value Converters
  • Silverlight Toolkit controls
  • Isolated Storage
  • Network connectivity
  • Web service requests to a public service
  • Out-of-browser experiences

I hope that it is simple enough for beginners to follow but also provide a broad spectrum of capabilities to the beginner.  Full code in C# and Visual Basic is provided.

Hope this helps!


This work is licensed under a Creative Commons Attribution By license.

First time here? You are looking at the most recent posts. You may also want to check out older archives. Please leave a comment, ask a question and consider subscribing to the latest posts via RSS or email. Thank you for visiting! (hide this)