Monthly Archives: May 2008

Remix 08

On Tuesday I had the pleasure of attending Remix 08 in Sydney.

The day really started on a high with the keynote. It opened with a video that showed off a few cool applications that have been developed in Australia using some of the latest Microsoft technologies such as Silverlight. That was followed by Mark Pesce’s presentation that really drilled home the effect of technology on today’s society in creating a state of “Hyperconnectivity” between people.

I tried quite hard to stick to the creative track and was rewarded very early with Jonas Follesoe‘s presentation. He showed how to use the Expression designer tools to create a truly amazing experience for Silverlight applications. His demo is available on his blog here.

I also managed to sit in on a few presentations by some fellow Readifarians – Philip Beadle and Tatham Oddie. Phil’s presentation showed how to use some really simple programming techniques (such as binding & asynchronous WCF) with Silverlight 2 to create cool web applications. Tatham’s presentation on MVC & AJAX was a really interesting take on possibilities of combining the two technologies in the future. Unfortunately, I missed Damo and Alister’s presentations…

Overall, I really did enjoy this event. It’s definitely one that I’ll be attending again in the future.

Advertisement

VMC Remote Unleashed!

Over the past couple of months I’ve put a fair few hours into a little side project of mine. The purpose of the project was to create a remote control for Vista Media Center PCs that would run on Windows Mobiles.

I’m happy to announce that I’ve finally released it! It’s available on CodePlex at www.codeplex.com/vmcremote.

At the moment, there’s a PPC 2003 and PPC 2003 SE version up for grabs in this initial release. I’m working on the Windows Mobile 6 versions as well.

All you need to get started is a device that can connect to your network and a media center running MCE Controller.

This thing has already come in handy for me, so I hope it’s just as useful for others. I’m going to continue working on it as much as possible, because I don’t think it’s quite done.

Some coming features will include:

  • an improved UI
  • bluetooth connectivity
  • wake on LAN support
  • more targetted versions

Check it out!

www.codeplex.com/vmcremote

Unable to Customise Context Menus in PowerPoint 2007?

I started working for a new client a couple of weeks ago. This client provides a customised solution for PowerPoint with many weird and wonderful functions. Part of the work I’m doing here is helping them migrate their solution to work with PowerPoint 2007.

While I’ve discovered many wacky behaviours that have come about due to the new rendering engine used in Office 2007, I hadn’t thrown my hands in the air and said “I can’t do it” until the other day. Something as simple as adding a button into a context menu when a user right-clicks a picture just would not work. There was already code in the project that did this for earlier version of PowerPoint, but no matter what I did it would not work for 2007.

Needless to say, I started seeking help, thinking that I was just missing something. Coatsie to the rescue! Well, sort of… 🙂

Unable to customise context menus in PowerPoint 2007

Andrew’s post basically shows how desperate I was by publishing my original email. Pathetic, hey…? 🙂

Anyway, the result was that you simply can’t do it. Adding items to the context menu is considered “feature depricated” so the new rendering engine forbids it and moves on. So how to overcome this? From Andrew’s post…

In summary, Microsoft recommends that you model your UI on Office’s own built-in Ribbon UI, specifically around the use of Contextual Tabs as the mechanism for displaying contextually relevant content. For each object type that the add-in supports, a tab could be added to the appropriate contextual tab set that would contain the Add-In-specific tools for working with that object. With this type of design, the UI would better match the UI of Office 2007, and the end-users could potentially not require much extra training on top of the training for Office 2007 itself. For more information, please check out the Office Fluent UI Style Guide at the Office Fluent Ribbon Developer Portal.

So the solution… Contextual Tab Sets! Now, I’m sure if I asked a room of 50 people what they were less than 2 would put their hand up. And googling it doesn’t help too much either.

In short, there are the regular tabs in the Office Ribbon, and Contextual Tabs. The regular tabs are the ones that are always there. The contextual ones are the ones that only show up when something has been selected in the designer. They’re usually highlighted a different colour too, so that they stand out.

One example of this is when you select a picture and a new Formatting tab pops up under the heading of Picture Tools. The Contextual Tab Set here is Picture Tools and the contextual tab is the Formatting tab.

One cool thing about the new Ribbon and all that Extensibility that’s provided for Office is that you can easily add (and remove) tabs in a contextual tab set. There are plenty of samples out there that do Ribbon customisation, especially on Office Fluent User Interface Developer Portal. Though, not many of them show how to do this.

I won’t go into creating a Ribbon Extensibility solution, instead I’ll just mention that all you have to do is create an Add-In for PowerPoint in Visual Studio (preferably 2008) with VSTO and override the Add-In’s CreateRibbonExtensibilityObject() method to return an object that implements IRibbonExtensibility. This object will implement the method GetCustomUI to return a string representation of the Ribbon XML.

Using the Custom UI XML, we can specify a Ribbon that simply adds a tab to any of these Contextual Tab Sets. The following snippet adds a “Custom” tab to the Drawing Tools tab set. The tab has a Hello World button in the Custom Group tab group.

<customUI xmlns=”http://schemas.microsoft.com/office/2006/01/customui”>
  <ribbon>
    <contextualTabs>
      <tabSet idMso=”TabSetDrawingTools”>
        <tab id=”TabCustom” label=”Custom”>
          <group id=”GroupCustomGroup” label=”Custom Group”>
            <button id=”ButtonHelloWorld” tag=”hello World” label=”Hello World”
                    screentip=”Displays a Hello World message box” onAction=”OnHelloWorld” />
          </group>
        </tab>
      </tabSet>
    </contextualTabs>
  </ribbon>
</customUI>

So once you have an add-in that provides a Ribbon representation similar to this, you will see that setting focus to a shape gives you the Drawing Tools Contextual Tab Set with the Formatting and Custom tabs.

According to the information Andrew received, this is basically the way to provide any contextual functionality in Office going forward. I still think it’s broken, but what can we do other than complain? 🙂