Apr 03, 2013

How to debug pointer capture

77CaptureWatcher

In our previous blog post, we mentioned some of the challenges developers face in creating keyboard-friendly applications, and we presented our FocusWatcher class for debugging these issues in Windows Store apps. The keyboard is just one way an app may receive input; Windows Store apps can also get input from mouse, stylus, and of course, touch. Modern tablets and touch screens often support multiple simultaneous touch inputs, in fact. All these different inputs can make it tough for developers to figure out what’s going on, especially when combining…

read more
Feb 11, 2013

How to debug keyboard focus

76FocusWatcher

When it comes to interacting with a graphical user interface, touch and mouse input typically come to mind first, and get the lion’s share of a developer’s attention. However, there are plenty of users who prefer to type or must type, and therefore it’s important to make sure applications work well with the keyboard. Fixing keyboard focus issues is the first step, whether you are making your application accessible to blind users or making it easier for everyone to navigate. Here are some problems we frequently encounter when…

read more
Jan 05, 2013

How to simultaneously enable/disable multiple controls

75SimultaneousEnableDisable

In a comment after our last blog post, a reader named Craig asked an interesting question. He wanted to know how he could enable and disable controls according to their individual needs, but also disable groups of controls simultaneously when his application is busy working on a long-running task. For example, in the text editor of a programming environment, the cut and paste buttons should be enabled or disabled depending on the current text selection and clipboard contents; however, while the programming environment is compiling code, all of…

read more
Dec 09, 2012

How to position data bound items

A long time ago in a galaxy far, far away, we wrote about the power of styles and templates in WPF, showing how ordinary-looking list box items could be transformed into a visualization of the planets in our solar system. Recently, we noticed that some of the techniques described there don’t work in Windows Store applications for Windows 8. In this post, we’ll revive the planets list box and describe the changes required to make it to work in a Win8 app. As in the WPF version, the…

read more
Nov 06, 2012

Binding RadioButtons to an Enum – Part V

73BindRadioButtonsToEnums5

Our last few blog posts presented four different solutions to bind a list of RadioButtons to an enumeration. Today we will discuss some of the pros and cons of each of these solutions. Hopefully this analysis will help you decide which solution is right for your scenario. Solution 1 – Use a ListBox to track selection and style its ListBoxItems to look like RadioButtons It’s a bit of work to re-style a ListBox and its ListBoxItems to look just right, and the resulting styles are quite verbose. However,…

read more
Oct 29, 2012

Binding RadioButtons to an Enum – Part IV

72BindRadioButtonsToEnums4

This is the fourth of a series of posts covering different options to bind a set of RadioButtons to an enumeration. The sample code provided here is written using WinRT for Windows Store applications running on Windows 8. Today’s solution binds each RadioButton’s IsChecked property to a helper class. This helper is a reusable generic class that wraps an enumeration and adds two-way binding capabilities. Our model is still the same: …

read more
Oct 22, 2012

Binding RadioButtons to an Enum – Part III

71BindRadioButtonsToEnums3

This is the third of a series of posts covering different options to bind a set of RadioButtons to an enumeration. The sample code provided here is written using WinRT for Windows Store applications running on Windows 8. In the solution discussed today, we’ll use a value converter to translate between the Boolean values used by the RadioButtons and the enumeration values stored in the view model. Our model is still the same:…

read more
Oct 15, 2012

Binding RadioButtons to an Enum – Part II

70BindRadioButtonsToEnums2

This is the second of a series of posts covering different options to bind a set of RadioButtons to an enumeration. The sample code provided here is written using WinRT for Windows Store applications running on Windows 8. In the solution we’ll discuss today, we’ll add the RadioButtons explicitly to the UI and we’ll bind each of them to a Boolean property in the view model. Our model is the same as in the first post of this series: …

read more