Pages

Saturday 13 October 2012

How to call WinRT APIs in Windows 8 from C# Desktop Applications - WinRT Diagram


How to call WinRT APIs in Windows 8 from C# Desktop Applications - WinRT Diagram
I was trying to access some of the sensors that are built into this Intel Ultrabook that runs Windows 8. However, while there's support for Location Sensors built into the .NET 4 libraries on Windows 7 and up, I want to access the complete Sensor and Location Platform that is built into Windows 8 itself. Those APIs are available via COM and I could call them via COM, but calling them via the WinRT layer is so much nicer. Plus, this is kind of why WinRT exists.

This got me thinking about WinRT and what it means. I did a podcast a few months ago that really cleared things up but I've always found all the various diagrams that attempted to explain how things fit together WAY TO COMPLEX.

Read More

TypeScript for Windows 8 Store Apps


What is TypeScript?
See http://www.typescriptlang.org

TypeScript was recently released and has become the new hot topic.  One of the questions I have asked and heard is can we use this for developing Windows Store Applications with Javascript and have the cool features that have been shown in the videos and examples.

One of the great features was the split window feature where you can code in TypeScript on the left and upon hitting save, it compiles to Javascript on the left. So I fired up a new Javascript Windows Store project in Visual Studio to give it a shot to see if it all works.  Before we get started make sure that you have the following:

  • Windows 8 & VS2012
  • Download the plugin: http://go.microsoft.com/fwlink/?LinkID=266563
  • VS 2012 Web Essentials: http://visualstudiogallery.msdn.microsoft.com/07d54d12-7133-4e15-becb-6f451ea3bea6


Read More

Secondary tiles with text


The call to pin a secondary tile looks like this:

SecondaryTile(string tileId, string shortName, string displayName, string arguments, TileOptions tileOptions, Uri logoReference);

The important part for this post is the last parameter: Uri logoReference. This is the the path to the image you want to show on the tile – but I had a problem, I didn’t want to show an image! I just had some text I wanted to show on the tile. After a lot of digging the solution was non trivial – generate an image at runtime. This was made even harder as the Render method in WPF does not exist in the XAML implementation used in WinRT.

Read More

Tips for Dealing with New and Missing Windows 8 XAML Controls


Although the Windows 8 XAML platform brings back a lot of the controls that exist in WPF and Silverlight, and adds some completely new ones, there are some controls that you might find missing and wonder what to do. In this article we cover a list of some of these controls, along with some suggested ways to cope with their loss.

Calendar
DataGrid
DatePicker
DockPanel
Flyout
GridSplitter
InkCanvas
Menu
MultiScaleImage
NumericUpDown
TabControl/Pivot/Panorama
TreeView
Viewport3D, D3DImage, DrawingSurface
WrapPanel

Read More

Walkthrough: the Windows 8 Settings and About Dialogs

Walkthrough: the Windows 8 Settings and About DialogsWindows 8 is a new user experience. One of the best parts is a uniformity and consistency across applications to handle common tasks the same. Specifically, I mean the charms. Users search consistently. Users share consistently. And, users access settings, preferences, options, personalization, and about screens consistently.

In some applications, there’s a Preferences item under the File menu. In some applications, there is an Options item under the Tools menu. In some applications, there is a Personalization item under the Edit menu. What’s a user suppose to do? Well, hunt for it – that’s the way it used to be. Do you see the problem? Of course you do. You’re smart.

Read More
Web Informer Button