Development

wlEmoticonsmile.png

Essential Windows Phone 7 Development Tools

We’re starting to do a lot more hands-on events/meetings/meetups where people as me “what stuff should I install before I come out there?”.  Well, here’s my list of tools to get you started.  I’ll keep this updated as new and interesting toolkits come out as well as trying to keep up with the ever evolving Windows Phone 7 development platform.  Some of these aren’t tied specifically to WP7, but are valuable all the same for WP7 development.

More to come when more are released Smile

Sharing the Light – Silverlight Development with Expression Blend

Victor Gaudioso

I am very happy to announce that our own Teresa Burger
has put together another amazing Silverlight training opportunity in the DFW area.  She has managed to successfully wrangle Victor Gaudioso, Microsoft MVP and Book Author to come to Dallas on September 25th to conduct a two-day training seminar on Silverlight development using Expression Blend and Visual Studio 2010

The basic outline for both days will contain the following

  • Blend IDE
  • Objects and Timelines
  • Storyboards
  • Drawing
  • Event Handling
  • Sample Data
  • Data binding
  • SketchFlow
  • Debugging with VS 2010
  • Visual State Manager
  • Using reference assemblies
  • New Features of Silverlight 4
  • Webcam and COM API’s

In addition to a catered lunch, the prize list she’s assembled is amazing, including an MSDN Ultimate subscription (valued at $11,899), a set of Infragistics controls (valued at $1,195), various books from Apress, and much more!

SO – what are you waiting for?  Spots are limited, so use the form below and sign up TODAY!

wlEmoticonwinkingsmile.png

InputScopes for Windows Phone 7

This entry is part 6 of 8 in the series Windows Phone 7

I have used Shawn Oster’s excellent InputScopes blog post and accompanying demo in the past when talking about Silverlight and the first revisions of the Windows Phone 7 dev tools, but noticed today when I was prepping for a talk that it no longer seems to work right with the Beta bits.

After a little code spelunking, some dusting and even a little vacuuming, I seem to have arrived at a really nice V2 demo.

Concept

The concept is simple – entering text into Silverlight and Windows Phone (via the SIP) is a customizable experience.  The concept of InputScopes was introduced to allow developers to customize how the keyboard would behave for a given input control (e.g. TextBox).  Not all controls support InputScopes, so make sure you read Shawn’s excellent article to get all the details.

Code changes

I only made a few changes, just to keep it in line with how our Best Practices have evolved.

First, I changed the behavior of the EnumHelper class to use LINQ and removed a whole bunch of code:

public static IEnumerable<string> GetNames(Type enumType)
{
    if (!enumType.IsEnum)
    {
        throw new InvalidOperationException("Specified generic parameter must be an enumeration.");
    }

    var query = from inputScope in enumType.GetFields(BindingFlags.Public | BindingFlags.Static)
                orderby inputScope.Name
                select inputScope.Name;

    return query;

}

Next, I cleaned up MainPage.xaml and replaced the code-behind approach with some element-to-element data binding to wire up the selected InputScope.  I also added a counter at the bottom showing how many InputScope objects are available in WP7.

    <Grid x:Name="LayoutRoot"
          Background="Transparent">

        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="1*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <TextBlock x:Name="PageTitle"
                   Text="input scopes"
                   Grid.Row="0"
                   Style="{StaticResource PhoneTextTitle1Style}" />
        <TextBox x:Name="textBox1"
                 FontSize="32"
                 Grid.Row="1"
                 InputScope="{Binding ElementName=listBox1, Path=SelectedItem}" />
        <ListBox x:Name="listBox1"
                 Margin="10"
                 Grid.Row="2"
                 SelectedItem="Default"
                 FontSize="32" />
        <StackPanel Grid.Row="3"
                    Orientation="Horizontal"
                    HorizontalAlignment="Center">
            <TextBlock FontSize="32"
                       Text="{Binding ElementName=listBox1, Path=Items.Count}" />
            <TextBlock FontSize="32"
                       Text=" InputScopes loaded" />
        </StackPanel>
    </Grid>

That way, the only thing left in my code-behind is the initialization of the ItemsSource property of the ListBox (which I could have changed to use MVVM instead, but hey…)

public partial class MainPage : PhoneApplicationPage
{
    // Constructor
    public MainPage()
    {
        InitializeComponent();
        listBox1.ItemsSource = EnumHelper.GetNames<InputScopeNameValue>();
    }
}

Get the bits!

I’ve posted them on my SkyDrive for easy access.  If you’re in Shreveport tonight, you’ll get to see this LIVE at tonight’s Shreveport .NET User Group meeting, albeit for only about 1 minute Winking smile

Windows Phone Design Day Recordings

For those of you interested in doing development on Windows Phone 7, Jaime Rodriguez just posted links to recordings from the recent Windows Phone Design Day:

A few weeks ago, our Studios team, the folks responsible for the end-to-end user experience on the phone, invited a few partners and agencies for what we called “Windows Phone Design Days”.  This was a 1.5 day deep-dive into their inspiration, philosophy, goals, and down to the 9mm details on implementation.  

If you are currently doing WP7 development, or are planning on doing it any time soon, I highly recommend you watch these sessions as you’ll find a lot of great information contained therein. Make sure you let him know if you found the videos valuable and report any suggestions for future video topics.

Windows Phone Design Day Recordings – Jaime Rodriguez – Site Home – MSDN Blogs