Mike Taulty's Blog
Bits and Bytes from Microsoft UK
Silverlight 1.1 Alpha Refresh - Name Things :-)

Blogs

Mike Taulty's Blog

Elsewhere

If you're writing code that dynamically generates "things" (Storyboards and so on) with the V1.1 Alpha Refresh then don't forget to give them a name (i.e. from a XAML perspective this is typically what you set with "x:Name" (using the convention of x there)) and from a code perspective this is DependencyObject.NameProperty otherwise I think you'll get failures.

I've been using Guids where I don't have a genuine name for an object. You might even in the C# 3.0 world have pseudo-code (not in front of a compiler as I write this) like;

public namespace XamlExtensions
{
  public static class XamlExtensions
  {
    public static void MakeUniqueName(this DependencyObject o)
    {
      string guid = Guid.NewGuid().ToString();
      o.SetValue(DependencyObject.Name, guid.ToString());
    }
  }
}

Posted Mon, Jul 30 2007 2:23 PM by mtaulty

Comments

Mike Ormond's Blog wrote Moving to Silverlight 1.1 Alpha Refresh - A Quick Checklist
on Mon, Aug 6 2007 6:07 AM
Here are a few things you'll have to change in your Silverlight 1.1 apps to get them working with the
Noticias externas wrote Moving to Silverlight 1.1 Alpha Refresh - A Quick Checklist
on Mon, Aug 6 2007 6:36 AM
Here are a few things you'll have to change in your Silverlight 1.1 apps to get them working with
MSDN Blog Postings » Moving to Silverlight 1.1 Alpha Refresh - A Quick Checklist wrote MSDN Blog Postings » Moving to Silverlight 1.1 Alpha Refresh - A Quick Checklist
on Mon, Aug 6 2007 7:07 AM