Late last year we released the Mobile Application SDK. Since that first release which provided COM and C bindings, we have also released a .NET version of the SDK called CMP.NET which is available for download here, and the documentation is online here. CMP.NET makes using the Mobile Application SDK much easier in your WPF and WinForms .NET apps. If you’re interested in using CMP.NET to create new apps or mobilize your existing .NET apps, you might find our new video series of interest. This series covers a range of topics on how to create mobilized WPF apps using the CMP.NET version of the SDK. So far we have published three videos in this series:

  1. Introduction to writing WPF apps. Before you cut a line of code you need to think about what your app is going to do. This is particularly important if you’re looking to create a new app as creating apps for mobile form factors introduce a new set of constraints that classic Windows apps don’t have to worry about. Learn about some of the issues you should be thinking about in this video.
  2. WPF styling introduction. Since we first started showing our GoldenGate email client, we’ve been asked how we made a Windows app look like a native mobile application. One important feature of WPF that allowed us to create a mobile look and feel is it’s ability to restyle controls. This video goes in detail into restyling a single control to show you how you can replace a Windows style control with one that looks like a native mobile control.
  3. Styling other commonly used controls. Continuing on from the previous video, I show you how to restyle several other controls. I use a recurring example of a mobilized XenApp admin console to show you how I built various elements of this app.

While the styling features of WPF are great when you want that perfect, mobile looking UI, you can get ahead of the game by copying some of the styles we created. The CMP.NET SDK comes with two sample apps that contain a range of styles that you can copy and reuse in your own apps. The two sample projects you will find are:

  • Demo.WPF: this is a demo app that shows a range of the Mobility SDK features in action. Use the first screen to pick a feature to demo such as auto-keyboard popup, sending notifications and displaying the local client picker control.
  • XaAdminMobile: this is the mobilized XenApp admin console that I show in my videos. This console displays all the sessions in a XenApp farm and allows you to select sessions and then reset them. Tap on the search field to quickly find the sessions you are after in large farms (note: the current version crashes if you’re using session sharing – the next release will fix this).

Just a note if you want to reuse any of the styles from these apps – they were originally designed for the iPhone so they assume a default DPI of 163. This means you have to initialize the API with this default DPI, i.e.

 

private CmpApi cmpApi;
private CmpWpfApi cmpWpfApi;
public App()
{
    this.cmpApi = new CmpApi();
    this.cmpWpfApi = new CmpWpfApi(this.cmpApi, <strong>new ReferenceDpi(163, 163)</strong>);
}

If you don’t explicitly provide a reference DPI of 163, the API assumes you are using the default Windows DPI of 96. So if you use the sample styles with the default DPI of 96, the DPI scaling will scale up the UI too much and all the controls will look too big.

So I hope you find the videos useful, and if you have any feedback on the SDK we would love to hear it. Our Mobility SDK forums are a great place to post questions and you can find me on Twitter @Donovan_RH.