Archive for the 'WPF' category

A swan song for 2012 and WPF

January 1, 2013 10:08 pm

I intended this to be my fifth and last post of 2012. Life intervened, and it turns out this will be my first post of 2013 instead. Blogging obviously took a back seat to other things last year. Sadly (seen from a certain perspective), I spent a lot of my time this past year reading that incredible time-sink, Twitter. I don’t follow many people, but the ones I follow always have something interesting in their streams. Another thing I spent a lot of time on, it seems, was working on a couple of Windows Phone apps and participating in local events around Windows Phone. But what really took up the bulk of my time at the beginning of the year was a project at work. And that’s what I will spend some time on now.

image

(A screenshot of HP Connected Backup running with a mock UI)

With the launch of Windows 8, HP has developed a more consumer-friendly version of the former Autonomy / Iron Mountain Connected Backup software, called HP Connected Backup. This is just one of the areas where HP is taking advantage of Autonomy’s technology and infrastructure, despite all the acquisition hoopla of late. I was closely involved in the implementation of the UI rewrite. The original Connected Backup software used a Java-based UI and was mostly offered for business and enterprise customers, and the user interface needed to change to be more consumer-friendly. As it happened, someone else made the decision that the UI should be implemented in WPF, still my favorite UI software technology stack. My involvement started when it became clear that the nature of the work was more complicated than the team working on the product had enough experience to pull off.

I had just finished work on another product that ended up only shipping via HP’s support website (called HP Quick Start, a tool for Windows 8 similar to Samsung’s S Launcher, now apparently renamed to Quick Starter; incidentally, there’s a really interesting story about why HP Quick Start didn’t ship, but that needs to be told in 10 years or so, not now). A colleague and I went to Austin, TX to meet with the Interaction/UI design company so I could learn about the amount and kind of work to be done. Their technical team had already started working with the HP development team in the Boston, MA area, and I got set up to work with them remotely as well. Some time after getting my feet wet in the codebase that had already been built (with a great M-V-VM foundation), and working with the Boston team over the phone, another colleague and I visited the team in Boston to start our collaboration for real. We stayed for about a week and got a few things done while we were there, but more importantly, we got to know the people on the team, and they got to know us a bit.

After returning from Boston, the real work began. I participated in daily stand-up meetings via phone. Because of the three hour time difference, I then had a few hours of opportunity to work while the remote team was available for questions and collaboration, and then I would continue working on my own, mostly from home. At the end of my day, I’d have the codebase pretty much to myself, so I didn’t have to worry too much about conflicting code check-ins.

Apart from looking at deliveries from the design house and making sure that everything from them was working as expected, I also built and customized many of the key UI components that were needed for the product. Let me run through just a few.

The tab control for the settings UI

image

The tab control work was mostly a job of cutting apart the Photoshop files from the design firm and fitting them into a styled TabControl/TabItem combo. The trickiest part was adjusting the transparency of the photoshop layers to make the transitions from tab to tab look right.

The UI that indicates file version numbers in the backup set

image

This control is based on heavy customization of the stock WPF DataGrid control with intricate interception of routed events and some complex visual tree trickery to get the interaction with the checkboxes and expansion/collapsing just right. Not to mention the view model construction, mapping the data to the actual backup information from the cloud (the data model).

The “accordion” control for the main UI

image

image

The accordion control is based on the WPF toolkit from February 2010, which contains an experimental implementation of such a beast. It was difficult to customize because it isn’t well documented and has a bunch of built-in behavior that we didn’t want. Not only did this require customizing the toolkit accordion’s styles, I also ended up building custom templates for the way the elements in the headers needed to switch appearance between the expanded vs. collapsed state. This was one of the last things to be finalized on the product. It was a very look-bound control to begin with, and it had a few bugs that were impossible to fix easily by modifying the source code.

The top header with the promotional offer

image

The offer header wasn’t too much work, except in the area of making it appear and disappear under the right circumstances (you don’t want it to show once a customer has subscribed, but you want it to show up again some time before a subscription expires). If I remember correctly (it was a while ago now), I even dug into writing some of the necessary async cloud client code that could retrieve the offer information from HP’s Connected cloud services. Because the final design deviated from what was delivered by the design firm, I actually ended up iterating on the visuals quite a bit with our Product Owner to arrive at something that was acceptable.

The “spinner” control and assets

image

Many parts of the UI are dependent on fetching information from the cloud, which can take a while. In these instances, it’s common to display a form of wait indicator to let the user know that something is happening. We had a control for such a wait indicator from previous products, so I didn’t need to create it from scratch, but the visuals for this control were, of course, new. Since the control uses a “flipbook” animation style (it renders a new image rapidly enough to give the impression of movement), I needed to create all the rotated snapshots for the flipbook to go through. This involved using Image Magick and a bunch of command-line scripting to automatically rotate and crop the original source image. Since we needed three different sizes of the spinner, I actually ended up modifying the existing control somewhat more than I thought, and created multiple sets of flipbook images via the Image Magick scripts I created.

The scrollbar assets

image

During usability studies it became apparent that our design firm had been – let’s say – “optimistic” on the size of the scrollbars that the UI needed. It turned out they were too hard for people to notice and use (i.e. too small). So I had to modify the underlying visual assets (Photoshop files again) without their help and adjust the scrollbar styles to accommodate the new, bigger parts.

Templates for dialog boxes

image

As part of being responsible for the overall translation of the wireframes and visuals from our design partner firm into real code, I needed to make sure our various dialog boxes were presented with a consistent style. Since there were too many dialogs for me to work on directly, I created sketches of guidelines for the team to use when they needed to work out a new dialog.

Quick Tips usability aid

image

image

image

image

I mentioned earlier that we conducted usability studies on the product. By the time we had enough of the product ready for testing, we found that the accordion design of the main UI was not as usable as we had hoped. Even with lots of tweaks to the original visual design cues/clues, people found the two panels of the accordion too difficult to use. I had toyed with the idea to integrate a tutorial of sorts into many of the products I’ve worked on in the past, but never seemed to have an opportunity to do something about it. Well, this time, I decided to take the time. I started implementing the idea and showed prototype screenshots to our usability lead. He liked the concept, and helped me work with our Product Owner to incorporate the idea into the final, shipping code, even though it was close to shipping time. We ended up naming this “Quick Tips”. WPF’s ability to layer UI elements on top of each other made the implementation relatively simple. One part that I’m quite proud of having been able to incorporate into Quick Tips was the ability to operate the UI from code, using WPF’s UI Automation framework. This was something I had wanted to work with ever since I attended the first sessions on this when WPF was unveiled as “Avalon/WinFX” at Microsoft’s PDC 2005. I was quite impressed with the capabilities of the platform in this area. It was relatively straightforward to open and close the accordion as needed to have tips pop up in the right context, etc. The only thing that was a bit tricky was to open up the help context menu and have it stay open with the “Quick Tips” menu item highlighted.

This is just a quick tour of a part of the work that was involved in creating HP Connected Backup. I’ve focused on my work, since that’s what I know best. The larger team worked on many, many more aspects of the product, not the least of which is, of course, readying the backend infrastructure for a consumer-level product and creating a UI for entering subscription and billing information. A part of the product I haven’t touched on at all is the subscription wizard, a standalone app that brought other UI challenges with it, and that walks the customer through the steps of creating an account on HP’s cloud systems and preparing the local system for backup of the customer’s data. This app required quite a bit of tweaking from the original design.

WPF riding into the sunset?

During the work with the accordion control I took a look at the WPF toolkit, since it had such a control in an “experimental” stage. “Experimental” – yeah, no kidding! After much fighting to get it to look the way it needed to look (the WPF toolkit accordion control is not “lookless” like most WPF controls), it became obvious that the version of the control in the “binaries” was different from the version in the source code, so modifying the source code to fix certain bugs was impossible. So I had to resign myself to re-styling much of the control and creating ugly, hacky workarounds for bugs I found.

And this is where my swan song for WPF starts. It seems pretty clear that Microsoft has completely de-invested from carrying WPF forward through their past community efforts. Yes, there’s been a lot of investment in WPF 4.5, but that seems to be about the end of the line. The WPF toolkit was supposed to be a vehicle for taking feedback from the community, developing something in response, refining it, and eventually integrating that into the platform. I think that’s how the calendar control in WPF came about, as well as many other things. The last release of the WPF toolkit was in February of 2010, almost three years ago. Apparently, and I’m guessing here, the work on Windows 8 took a lot of the “steam” out of WPF. The focus was put on developing the XAML platform for Windows 8 “Store Apps”. And it’s been quite detrimental to WPF. From my perspective, WPF’s problem lies in the fact that many of the visionaries behind the original concept are no longer involved in the product. It may very well be that WPF is a mature technology by now (although some people see it as not having fulfilled its promise by a long shot), but leaving it in maintenance mode seems to me to be stopping before you’re really “done done”. Such a pity to see a platform with such incredible potential being wasted for whatever reasons.

Windows 8 XAML

Finally, a small rant on Windows 8 XAML: Compared to WPF, the Windows 8 XAML platform is clearly a “V1” product. It’s almost embarrassing how much of the power of WPF is missing from the Windows 8 XAML platform. I can only point to a few things off the top of my head, but I’m sure you can find many references elsewhere. There’s no tiling Image Brush. No Radial Gradient brush. A lot of the built-in controls are laden with “fast and fluid” behavior, such as built-in transitions, that are very cumbersome to remove or alter. The data binding mechanisms are primitive compared to WPF. Having worked with this new platform for a little while now (a topic for another post, perhaps), I think I can say that I’m disappointed. It’s hard to live up to the power of WPF. I hope Microsoft will get there eventually and I hope WPF will come back “from the dead” now that Windows 8 is here.

An easy sound device reset tool for Conexant “Waikiki” HD Audio device on HP dv8000 laptops

March 3, 2012 4:54 pm

image

As I’ve previously written (in February of 2008), there are some computer systems out there that have trouble retaining the functionality of the sound device when Windows comes back from sleep/hibernate.

Since my article from that time is one of the most popular here on my blog, and I was quite fed up by the lack of a driver-based solution, I decided to write a little app to at least put a band-aid on the problem.

This little WPF 3.5-based app, Sound Reset,  lets you reset the device without having to go to Device Manager to disable and re-enable the device. If your device has a different identifier, you can enter the id into the provided text field before clicking the button.

After you download from the link above, unzip the file (for example, using the excellent, free 7-zip) to get the Windows Installer file (SetupSoundReset.msi) and double-click it to install the tool. Let me know if you have any suggestions for changes to the app.

Enjoy!

A brief history of five TouchSmart generations–pioneering ideas for Windows 8

September 26, 2011 10:15 am

A few weeks ago I attended Microsoft’s BUILD conference to get ready for what’s coming in Windows 8. As I was sitting in the first day’s keynotes and big picture sessions, I couldn’t help but think back on the work HP has done with its TouchSmart software and notice areas where the TouchSmart software pioneered ideas that Microsoft is now building into Windows 8 for the new Metro style of programming and the new touch-first Start screen. I decided to dig a little deeper and give you a brief tour of the history of TouchSmart and highlight some of the ideas now in Windows 8 that we put into the TouchSmart software a long time ago. I’ll put a [+Win8] marker by the ideas as I go along. Let’s get started!

TouchSmart 1, aka SmartCenter, aka LaunchPad (January 2007)

The first version of TouchSmart was not called that. It was named SmartCenter and shipped with the very first modern all-in-one touch-enabled PC, the HP TouchSmart IQ770.

               

This machine was one of the so-called “Dream PCs” for Microsoft’s introduction of Windows Vista in January of 2007. I’ve written about this version of SmartCenter before, so I won’t repeat much of that here.

Touch-first [+Win8]

Of course, the main point of even embarking on a project such as the SmartCenter software was that Windows wasn’t even remotely ready for touch interactions. Every app on the Windows Desktop requires the precision that the mouse pointer provides. Fingers and touch can’t hit the tiny controls accurately enough. So SmartCenter was designed with that in mind, and as a result had large targets all throughout its user interface. Here are some sample screenshots:

SmartCenter_1_HomeSmartCenter_1_Personalize_1SmartCenter_1_Personalize_2SmartCenter_1_Personalize_3SmartCenter_1_Weather_2SmartCenter_1_Weather_3

Note that all buttons, checkboxes, radio buttons, scrollbars, etc. are large enough to be easily tapped with a finger. Note also that, for example, the on-screen keyboard that is used for entering a ZIP code in the Weather app defaults to the correct layout, i.e. the numeric one.

Live app data in shortcuts [+Win8]

This idea wasn’t really all that new, of course. Snippets of live app data displayed in a mini-view of sorts had been introduced with Windows Sidebar gadgets and other widget-like UIs on other operating systems, but SmartCenter was the first to use live data as part of the shortcut that launches an app. You could say the shortcuts were more like mini-versions of the full app. Live data is of course hard to demo with screenshots, so here is a small video clip of the SmartCenter home screen (or start screen, if you will), showing shortcuts that update their information as time passes:

This major version of the SmartCenter software was delivered with four total releases: 1.0, 1.1, 1.2, and 1.4. Towards the final delivery of version 1.0, it became clear that a standardized way of getting the live information from the apps was needed. This became a major area of investigation and investment for the next major version of the software.

 

TouchSmart 2 (June 2008)

The second generation of TouchSmart software, 2.x, was introduced with IQ500/IQ800 series hardware. These two hardware models marked the beginning of the monitor-like appearance of the TouchSmart PCs. The IQ770 was a “multi-volume” chassis – these new models had a “single volume” design, supported by the “easel” style feet that were used in the follow-on generation as well.

         

The 2.x series of software was released in three versions: 2.0, 2.5 and 2.8.

Fixed layouts for apps [+Win8]

With SmartCenter 2.0, we introduced the concept of fixed sized layouts for the TouchSmart apps. We initially picked three: small, medium and large. You can see two of the three illustrated by this screenshot:

image

The Tutorials, Canvas and Calendar apps are shown in medium size, while the remaining apps are shown in small size. By tapping on an app, you would go to the large size:

image

This layout is purposely not called full screen, since there is a reserved area at the top of the screen for navigation, app name/time and music playback controls.

Tiles concept [+Win8]

In order to make it clear that the app representations in SmartCenter were not just icons, we decided to call them tiles, or rather “live tiles.” This term was used in the developer documentation that was produced to help other people plug their apps into SmartCenter, and so we had “small tiles,” “medium tiles” and “large tiles.” For each tile size we gave guidance about how to use it appropriately. We introduced the term “layouts” to suggest that each tile size should use a different layout of basically the same content or information. As you notice from the screenshots above, when the Weather tile is small, it shows only basic information. In the large tile, the information is more full-featured and also provides access to settings for the Weather app. The medium tile for Weather looks like this:

Medium

As you can see, this layout for Weather includes only the current conditions and the forecast for the day.

With TouchSmart 2.0, a big investment was made to produce media consumption applications: Music, Video and Photo (often shortened to “MVP”) as well as a WebCam and DVD app. The screenshot above shows other apps that were published later (Netflix and Recipe Box, for example), but that just goes to show that following development guidelines has benefits: newer apps can work with older SmartCenter versions…

Other changes from the 1.0 version include the top and bottom row of “tile scrollers” and the music playback control set (aka. “media plate”) that I already mentioned. The tile scrollers had two different behaviors, depending on how full they were. If enough tiles were present, the scroller would become an infinitely looping container. If not enough tiles were present, it would have “snap-to” endpoints.

The TouchSmart 2.0 software was unveiled at a big press event in Berlin, Germany. Several of my colleagues were invited to attend to make sure everything went smoothly from a technical perspective. The most nerve-wracking part was that the TouchSmart IQ500 was to come out of a pedestal on stage after sitting inside said pedestal for an extended period of time before its unveiling. People were not sure the thermals were designed to handle as little exchange of air as this posed. Here’s a video from the introduction to give you a better idea of what I’m talking about (skip towards 1:18 or so to see the pedestal and the TouchSmart lifting out of it):

As you can see, everything worked out pretty well. This was the biggest introduction ever made for a TouchSmart PC line. No event after that had that much effort put into it.

 

TouchSmart 3 (October 2009)

With the third generation of SmartCenter, we piggybacked onto the 600/300 series of hardware. The enclosures still used the easel stand design with three feet for support, and the exterior was tweaked a bit along with the screen aspect ratio (now 16:9 instead of 16:10).

         

Generally, though the concept was largely the same, except for the software. A big investment was made to produce more apps for the TouchSmart software suite, and this brought us apps like Canvas, Twitter, Hulu, Live TV, Link, Movie Store, Recipe Box and a bunch of others. The TouchSmart software development guidelines were augmented with more of a proper SDK with app samples, installer samples and more guidance.

New layout

SmartCenter 3.0 introduced another layout that we called wide-interactive. You see, in SmartCenter 2.x there was no way to interact with the medium sized tiles in the upper tile scroller (except for in the browser, but that’s a small detail). In this version we wanted to provide interaction with the app in the upper scroller. In order to do that properly we needed a bigger size tile and a new layout to have enough space for interaction to make sense. Here’s a screenshot of 3.0 (running on a 16:10 screen, not the aspect ratio it was designed for – so circular elements are “squished”):

image

In SmartCenter 3.0 the touch scrollers no longer “looped” infinitely, but each had a “snap to” end regardless of how many tiles were present; each wide-interactive tile was given a colored title bar to add a little splash of variety and visual interest. In addition, the “media plate” and other control elements on the home screen were redesigned to appear a bit lighter than before. Also, standard button glyphs were introduced for closing and minimizing SmartCenter. Oh, and the clock was moved around and given a day of the week display. Phew – at least the Personalize button stayed almost in place…

The final big change was that tiles in the bottom scroller no longer used the small layout. They were simply icons to launch the app into large layout directly. This was done to improve performance and load less stuff at the startup of SmartCenter.

 

TouchSmart 4 (September 2010)

Okay, so here we are, almost at the last chapter of this brief history (which is turning out not so brief after all…) TouchSmart 4.0 was introduced with the TouchSmart 310 (and 610) series of hardware. These departed from the easel-type stand and went to a single-foot design (I know there’s a better term for it, I just can’t think of it at the moment).

         

TouchSmart 4 didn’t see much investment in new apps, but focused on new capabilities provided by the SmartCenter framework.

Infinite Canvas [+Win8, sort of, on the Metro Start screen]

A major goal of the SmartCenter framework software had been to provide an almost limitless space for apps to live in. With SmartCenter 4.0 that goal was finally realized. Not only did the framework provide for an infinitely expanding space for hosted apps to live in, it also did away with the upper tile scroller and let the apps be positioned freely on the canvas. This is what TouchSmart 4.0 looks like after initial startup:

image

And once again, things were moved around on screen: The clock from lower left to lower right (and it was given a function: click to show a mini-calendar), personalize from lower right to lower left (and the word personalize removed). The “media plate” music playback controls were removed and put into the music app instead. The volume control was separated out from the media plate and put in the upper left. The bottom carousel was redesigned and had the infinite looping re-introduced (to allow for a bit of visual and interactive playfulness). Tapping a tile launches the corresponding app:

image

Apps can be moved around freely and the carousel shows a colored highlight for each running app:

image

If you look at the above shot closely, you’ll notice the Weather app in what looks like another layout. What’s happening there is not a new layout, though. It’s simply the wide-interactive layout, shrunk down to an “inactive” size. Thus we called it “shrunk layout” or “shrunk view”.

The button next to personalize in the lower left can be used if the app you’re looking for in the carousel is hard to find: QuickLaunch is sorted alphabetically:

image

Parallax background [+Win8, sort of, on the Metro Start screen]

Scrolling the canvas (or panning it, if you prefer) is done by grabbing empty space (with mouse or touch) and moving from side to side. To add a little visual interest to this, and to demonstrate the departure from the 3.0 tile scrollers, we added a parallax effect to the background to give you the illusion of looking into the distance on your screen. Several sets of parallax backgrounds were developed for variety’s sake, to be picked in the personalize area.

Magnets

Another major feature of SmartCenter 4.0 was the introduction of something we called “magnets”. These represent active content that originally came either from an app or from SmartCenter itself (in the case of Graffiti magnets). Magnets eliminate the need to start an app when you want to enjoy a favorite piece of content, be it a photo, video or some music you want to keep handy for quick enjoyment. Here are a few magnets placed on the canvas (they can be “pinned” so they always stay visible or “unpinned” to scroll with the canvas):

image

Here’s what it looks like after panning a bit (while playing the fireplace video):

image

You can see the pinned magnets haven’t moved and the background looks slightly different (the islands have moved at different paces to give the illusion of depth as they’re moving).

Okay, let’s see what it looks like in action:

 

TouchSmart 5 (September 2011)

And that brings us to the latest generation of SmartCenter (as of this date), i.e. 5.0. This version of the TouchSmart framework software was brought to market with the just recently introduced 520/420/320 series of TouchSmart PCs. The exterior of the machines has been updated once more to keep up with design trends, but otherwise the single-volume enclosure is still the chosen form.

            

Integration of Windows apps, desktop icons

The biggest change in SmartCenter 5.0 regards the blending of the two environments that were previously separated: SmartCenter and the Windows Desktop. This means you no longer need to exit the SmartCenter environment when you want to run Windows apps. Here’s a screenshot of SmartCenter 5.0:

image

Note that the Windows 7 taskbar is fully visible and that you can use it for launching apps and seeing what apps are running. The SmartCenter app carousel now has the icon highlight turned on permanently and only shows a short animated starburst as an app is launched. You also see all your desktop icons represented on the SmartCenter canvas. As you can see, the magnets overlap the desktop icons, which can be a bit of a clutter issue. No worries, you can turn off the desktop icons via Settings, if you don’t like them on the canvas. Or you can rearrange your magnets so they occupy different space:

image

In general, SmartCenter 5.0 attempts to bring the touch-first environment of past generations together with the traditional, mouse-centric desktop. That’s a value-proposition you don’t have in Windows 8, which is most likely not available until sometime in late 2012 anyway…

Automatic panning/scrolling

One additional thing SmartCenter 5.0 does is automatic panning of the canvas/desktop whenever an app is launched. This removes the need for you to have to rearrange app windows frequently when you want to switch from one app to another. The canvas pans automatically to make more room for every app you start. To return to an app, you just click on it in the taskbar or the app carousel. Another video might explain it a bit better:

This behavior can be turned off in Settings as well, in case it’s not useful to you. There are many, many areas that I haven’t touched on in this post, such as all the personalization and customization aspects that SmartCenter contains and how they changed over time. Or the fact that you can make your own parallax backgrounds (not documented anywhere, unfortunately, but pretty easy to figure out for enterprising souls). Or the easter eggs, oh yes…

Let me make some general remarks about the last four generations of SmartCenter: Any apps written to observe the guidelines of SmartCenter 2.0 are able to run on SmartCenter 2.0 through 5.0. A nice compatibility feature. Of course, older versions of apps needed updates as new SmartCenter functionality was introduced (or removed, as with the media plate removal in 4.0), but as you’ve seen, the Netflix app (which was published with SmartCenter 3.0) runs just fine in SmartCenter 2.0 and 5.0 as well. What’s more, if you know what you’re doing, you can have all the versions of SmartCenter 2.0 – 5.0 running on the same system. That’s how I was able to collect screenshots and videos for this post. Oh, and the technology underlying all these versions of SmartCenter is Microsoft’s Windows Presentation Foundation (WPF), 3.0, 3.5, and 4.0. The various apps were written in anything from compiled-to-native-code-Python to WPF to Adobe Flash. The software development process used since about SmartCenter 2.5 is anchored in Scrum, an Agile software development framework.

This concludes my brief history of the TouchSmart software. As you have seen, Windows 8 definitely picked up a lot of the features that the SmartCenter framework pioneered: Live tiles, fixed layout sizes for apps, parallax scrolling with an expandable space and touch-first design. Until Windows 8 is available, the TouchSmart 5.0 software suite is most likely the best alternative for touch – combined with new thinking on how to add something more to the the desktop environment – that you’ll find on an all-in-one PC anywhere.

HP TouchSmart SDK 3.0 – Giveaways at PDC 09

November 17, 2009 9:00 am

To mark the release of the TouchSmart 3.0 SDK, HP has a goodie to give away at the Microsoft PDC 09: A super-slim 2 GB USB memory stick (embedded in a hard-plastic business card with a nice imprint). It contains the new SDK and a few documents about a software development partner program HP is starting.

If you see me at PDC, say hi, and I may be able to hand you one of these puppies. I only have a limited supply, though. 15 to be precise.

Check out the pictures:

IMG_3135

Front of the card

 

IMG_3136

Back of the card

 

IMG_3137

Back of the card with USB memory stick flipped open/out

 

IMG_3138 

Front of the card with USB memory stick flipped open/out

Mastodon