Monthly Archives: October 2013

Javascript Windows Apps

I’m a XAML / C# kind of guy. I haven’t delved very much into the JavaScript side of W8 app development, but when browsing the store earlier today I cam across the CodeShow() app. (store link)

CodeShow() Logo
CodeShow() Logo

If you are running with a JavaScript project, there are plenty of examples in the app of how to achieve certain things with working demos and source code. Seems like it could be a useful resource.

*Disclaimer* : I am not associated in any way with the author of this app – I’m just pointing to it in case someone finds it useful.

Discrete Slider in Windows Phone

This morning I found an interesting question on StackOverflow asking how to make the default Windows Phone slider control return discrete values (in this case an integer value rather than the default double).

There are several possible ways to go about this, but the one that leapt out was to create an attached property on the slider and bind to that.

The entire helper class for the property looks like this.

The points to note here are:

  1. On line 7 we hook into the slider’s ValueChanged event so that we can round the value.
  2. Ob line 12 I just return the slider’s Value property, cast as an integer. This value has already been rounded and set on line 7.
  3. If we don’t attach the property, the slider will continue to behave as normal

To use this code in an app, here’s a sample of three sliders, each with a TextBlock to display the Value.

I know this isn’t an elegant solution to the problem, and that it has a couple of issues, but it does work and should give the results the original questioner was after.

Syncfusion e-books

Syncfusion have released a series of e-books on various topics, including Windows Store Apps. You need to enter some registration information to be able to access them, but the content looks good at first glance – certainly good enough to make it worth registering.

Nokia Imaging SDK and the Emulator

If you’re testing an app that uses the Nokia Imaging SDK (or any other app that access your pictures library, for that matter) and you can’t see any content in your pictures library it might be the result of a bug in the emulator.

If you need to access the in-built images, you need to open the photos app at least once before you run your app. once you’ve done that, the content will become available to your app.

(Thanks to the guys at Nokia, this information has now been added into the documentation. I’m childishly pleased to have been able to help out in my own small way. ;) )