Welcome to MSDN Blogs Sign in | Join | Help

Mike Ormond's Blog

In my world, things would be simpler than this...
Am I Wasting My Time with Technorati?
Convince me that I’m wrong somebody. I used to rely on Technorati a lot. I got a good idea of what worked and what didn’t. I kept an eye on the conversations. I could see who was linking to my content. I even built my tag cloud using Technorati.

But recently my old friend Technorati is ignoring me. He no longer calls, he no longer writes and most annoyingly he no longer crawls my blog.

image

I ping him after every post. I’ve sent him mail (twice) to complain but he doesn’t reply. What am I to do?

Technorati, it’s time to turn the tables and switch you off I think.

Technorati Tags:
Expression Encoder SL 2 MediaPlayer Templates and SL Streaming

I’ve just been scratching my head wondering why I can’t publish from Expression Encoder 2 to Silverlight Streaming using one of the new SL 2 media player templates. The simple answer being that the “Publish to Silverlight Streaming” plug-in doesn’t yet support this (you’ll probably see a message “No Silverlight template found. Please re-encode.” if you try to do this).

image

I had a play around and found a way to publish the SL 2 player to Silverlight Streaming and get it to play your video – you just have to do it manually rather than rely on the plug-in. Here are the steps I used…

  • Package the output from Expression Encoder and upload to Silverlight Streaming in the usual way
    • Essentially that means zipping up the MediaPlayerTemplate.xap and your wmv file and uploading
    • You can either add a manifest to the zip file before upload or create one using the UI in Silverlight Streaming
  • imageFollow Method 2 “Use a Live Control” to embed your application in a web page
    • The MediaPlayer gets its playlist from initparams – that means you need to use the “Live Control” to embed the MediaPlayer application (as far as I can see there’s no way to use initparams with the iframe embed method)
  • To point the MediaPlayer at the video to be played, add an initparams attribute to the HTML slscontrol fragment (step 3)
  • Thus you end up with something like:

<devlive:slscontrol silverlightversion="2.0" src="/27832/ProductViewer_Blog/"
  initparams='playlist=<playList><playListItems><playListItem mediaSource="http://silverlight.services.live.com/27832/Test_CanDelete/ProductViewer.wmv" frameRate="10" width="640" height="480" ></playListItem></playListItems></playList>'>
</devlive:slscontrol>

Where 27832 is my account ID, Test_CanDelete is the fileSet name and ProductViewer.wmv is the video filename.

Of course, you could *just* publish the MediaPlayer application, publish all your videos to Silverlight Streaming as videos (rather than as part of your application) and then simply use the above technique to point the MediaPlayer to the required video.

Windows 7 Beta Available Now to MSDN Subscribers

If you’re an MSDN or TechNet subscriber you now have access to the Windows 7 Beta. Broad availability will commence from tomorrow so you don’t have long to wait.

image

I’ve been running a recent build of Windows 7 on the Asus Aspire One netbook I got for Christmas and I’ve been really impressed. It runs like a dream despite the limited resources, makes best use of the limited screen resource without me having to configure anything and starts and stops really quickly.

I noticed there was a review mentioned on the front page of the Telegraph this morning – it’s available here.

Technorati Tags: ,,
A Host of Slidedecks

I really like this Slideshare widget showing all our available decks (I first saw it on Marc's blog):


And I see that MikeT has added a bunch of slidedecks and Andrew has also started to add his. Soon you'll be spoilt for choice!

Technorati Tags: ,,,
Slideshare Add-in for PowerPoint 2007

If only I'd had this a week or so ago! Nice add-in that supports (amongst other things) uploading, has a nice tagging UI and even includes reporting capabilities.

Publish Report

Technorati Tags: ,

MIX09 Special Offer - 40% Discount

That's right, there's a 40% discount available for the first 200 registrations using RSVP code MIXspecial1. Simply visit the registration page, click on "Register for the event using an RSVP Code" and, well you can figure out the rest...

Even in the current economic climate, $795 looks like a great deal.

 
What:MIX09
When:Wednesday, March 18, 2009 9:00 AM to Friday, March 20, 2009 3:00 PM
Where:Venetian Resort - Hotel - Casino
3355 Las Vegas Boulevard South
Las Vegas, Nevada 89109   United States

Technorati Tags: ,
Silverlight No Selection ListBox and ViewBox

I wanted to display the list of search terms at the top of my Twitfeed Silverlight app (see below) and highlight the current search term. The obvious way to do this is to databind a ListBox to the search terms collection. I ran into a few things I needed to resolve:

  • ListBox supports selection - ie I can select individual items - I don't want this enabled
  • There's no property on the ListBox to access individual items - how do I highlight a specific term?
  • I wanted to size the ListBox to the window so needed to use a ViewBox as part of the template
  • I wanted the ListBox horizontal

Let's tackle those in reverse - easiest first:

Horizontal ListBox

Easy one - just override the default ItemsPanel with a template such as:

    <ItemsPanelTemplate x:Key="ItemsTemplate1">
        <StackPanel HorizontalAlignment="Center" Orientation="Horizontal"/>
    </ItemsPanelTemplate>

Scale the ListBox with a ViewBox

I struggled with this a bit as I was initially trying to incorporate the ViewBox as part of the ItemsPanelTemplate. In fact you simply override the default Template for the ListBox with a Template such as:

    <ControlTemplate x:Key="Template1">
      <tkt:Viewbox>
        <ItemsPresenter Margin="25,5,25,5"></ItemsPresenter>
      </tkt:Viewbox>
    </ControlTemplate>

Accessing Individual ListBox Items

There are some different options here but I decided to go with adding an eventhandler for the loaded event of individual items which gives me an opportunity to create a collection of ListBox items.

    <DataTemplate x:Key="DataTemplate1">
      <TextBlock HorizontalAlignment="Center" 
                 Foreground="White" FontSize="24" 
                 Text="{Binding}" 
                 Loaded="DataTemplate_Loaded"/>
    </DataTemplate>

In my case, each item is a TextBlock and I simply track them in a List. I also set the first item to the highlight colour as that's the first search to be performed.

  private void DataTemplate_Loaded(object sender, System.Windows.RoutedEventArgs e)
  {
      _displayTerms.Add(sender as TextBlock);

      if (_displayTerms.Count == 1)
      {
          _displayTerms[0].Foreground = new SolidColorBrush(Colors.Yellow);
      }
  }

Disabling Selection

To disable selection you can change the ItemContainerStyle on the ListBox to simplify the ListBoxItem Template. In Blend select the ListBox then select Object -> Edit Other Styles -> Edit ItemContainerStyle from the menu then select Object -> Edit Control Parts (Template) -> Edit Template. Essentially you remove all the transitions and elements associated with selection. I boiled it down to:

    <Style x:Key="ListBoxItemStyle2" TargetType="ListBoxItem">
      <Setter Property="Template">
        <Setter.Value>
          <ControlTemplate TargetType="ListBoxItem">
            <Grid Background="{TemplateBinding Background}">
              <ContentPresenter HorizontalAlignment="Left" 
                                Margin="{TemplateBinding Padding}" 
                                x:Name="contentPresenter" Content="{TemplateBinding Content}" 
                                ContentTemplate="{TemplateBinding ContentTemplate}" />
            </Grid>
          </ControlTemplate>
        </Setter.Value>
      </Setter>
    </Style>

And with that I had exactly what I wanted. Silverlight and XAML make it so easy to customise controls to work just the way you want them to.

A Zune phone would be very cool

SNC00004Rumours of a Zune phone announcement (and denials) abound. You can even see pictures of it on the internet. Fortunately I have learned, thanks to Jon Holmes and "The Now Show", that sometimes things on the internet aren't true (quote: "1 in 4 potatoes is a rabbit's egg").

Here's my own personal Zune phone wot I made which I'm finding to be quite functional though the lack of a touch screen makes operating the keys somewhat difficult.

Anyway, it will never displace the Samsung Omnia in my affections (which is now running Route 66 and makes a cracking SatNav). I love my Omnia.

Technorati Tags: ,,,,
MSDN Rich Client event in Manchester now confirmed

Thursday, February 26, 2009
1:00 PM to 4:30 PM
MSDN: Catch Up with Microsoft Rich Client Technologies for 2008
This event is free to attend but you must register at http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032397778&Culture=en-GB Overview: In this half-day session we’ll do a refresh of the ...
The Lowry
Pier 8 Salford Quays
Manchester,   United Kingdom
Download iCalendar file

Slideshare slidedecks need a different approach

 

I've now uploaded the last 12 months or so of slidedecks from our MSDN events to Slideshare. You can still get the originals from the MSDN Events Site but Slideshare adds discoverability and also allows direct embedding (as below).

What's clear to me is that for an optimised Slideshare experience, you need to consider it as part of your slidedeck design. Animations are out for a start but it also demands (or at least entreats) more of a narrative approach. Whether this lends itself so well to a particular session and the "live" experience is another matter.