Jeremy Likness' Blog

Jeremy Likness' Blog

  • MVVM and Accessing the UI Thread in Windows Store Apps

    Any developer who has worked with MVVM in WPF, Silverlight, or Windows Store apps has likely run into the issue of executing an action on the UI thread. This most often happens when work has to be done on another thread. It is a common mistake to perform the work and then attempt to set a property on the view model. The view model exposes properties for data-binding, and data-binding must happen on the UI thread. Therefore, triggering a property change notification on the wrong thread can lead …

    Read More...
  • Simple Validation with MVVM for Windows Store Apps

    Developers who are writing Windows Store apps using C# and XAML might find some of the support for Model-View-ViewModel (MVVM) lacking. Both WPF and Silverlight provided specific interfaces that enabled you to store validation context about fields on a context and even supported asynchronous validation. Although there are some existing frameworks that provide this support, such as Prism for the Windows Runtime, it is also fairly simple and straightforward to roll your own.

    I do appreciate the …

    Read More...
  • Single Sign On with OAuth in Windows Store Apps

    Various providers often provide documentation and even SDKs that make it easier to connect with and authenticate to their service. The problem is that most scenarios assume a web-based application or specific mobile clients. The process in general looks something like this:

    How can you take protocol modeled for the web and make it work in an app that is running on a Windows 8 device? The answer is the WebAuthenticationBroker component in the Windows Runtime.

    The web authentication broker is …

    Read More...
  • Quick Tip: Processing HTML Content in Windows Store Apps

    The WebView control allows you to display content from sites in your app using a small window that renders the HTML using the same rendering engine as Internet Explorer. It does have some limitations and most likely if you are providing content in your app, your goal is to augment your app with fresh data rather than try to superimpose a full-blown web application on your own native Windows Store app.

    Trying to strip down content can be quite cumbersome once you wade through the myriad RegEx …

    Read More...
  • A Fluent Approach to Windows Store Tiles

    Windows Store apps have a variety of tricks up their sleeve for engaging the user even when they are not running. Tiles are a perfect example because they provide at-a-glance information to the user from the start screen. Tiles can provide images, text, or a combination of both and support queuing multiple notifications.

    Tiles are defined by various pre-built XML templates. The catalog of tiles is available online in the tile template catalog and can be enumerated via TileTemplateType as …

    Read More...
  • Asynchronous Commands in Windows Store Apps

    The Model-View-View Model (MVVM) pattern is more popular than ever and is built into the Visual Studio templates for creating Windows Store apps. Developers familiar with Silverlight already encountered the platform shift to using asynchronous operations because it was impossible to generate a WCF client with synchronous methods. The Windows Runtime (WinRT) takes this further by dictating any operation that may potentially take longer than 50ms to complete should be asynchronous. How does the …

    Read More...
  • Windows Store Apps, SVG, and HTML Interoperability

    There are several reasons you may wish to show HTML content in your Windows Store app. You may have information that is updated frequently and makes the most sense to consume as HTML data. Your app may aggregate feeds that contain HTML content. In some cases you may be creating a native client that accesses an existing web-based application that you need to interoperate with. Fortunately, the WinRT has a control that addresses these needs: the WebView control. It is important to understand …

    Read More...
  • Review of the Lenovo IdeaPad Yoga 13 for Development

    After several months of comparing various Windows 8 devices to replace my old 1.5” thick 6-lb. Dell laptop, I finally settled on the Lenovo IdeaPad Yoga 13. My requirements are fairly straightforward: I want 8GB of RAM and a minimum of 256GB SSD, I have to have a touch display and the resolution needs to be at least HD+ (1600 x 900). I wasn’t as concerned about budget and there was one device that fit the bill perfectly: the ASUS ZenBook Prime Touch. The only catch was that the 8GB version isn’ …

    Read More...
  • Referencing the Windows Runtime from Desktop Apps

    Most people think of the Windows Runtime as being synonymous with the formerly-known-as “Metro” applications, now called Windows Store apps. To add to the confusion, of course, is the fact that the ARM-based version of the Windows OS is branded as Windows RT. Programmers, being lazy, like our abbreviations so the runtime has been adopted by the world at large as WinRT. Did you know you can reference WinRT from desktop applications? It’s possible, but not easy nor straightforward. There are …

    Read More...
  • Traveling with Microsoft and the ASUS VivoTab RT

    My daughter turns 13 today and to celebrate, our family took a trip to Paris, France. We celebrated Christmas and New Year’s Eve (bonne année) there. I recently purchased an ASUS VivoTab RT and turned over my Samsung Series 7 slate to my wife. We decided to travel light and only bring the slates – no heavy laptops. We were gone for 10 days – so how was the experience? In a word, fantastic! Before I share some updates around the slate itself, I wanted to mention a few technologies that eased my …

    Read More...

Archives

Tags