Feed on

Get the best HLSL Book available for XAML developers

A comprehensive guide to creating HLSL pixel shaders for WPF and Silverlight applications

Really, this will be a must have book for hardcore xaml people. ... this is the best shader content I’ve seen to date. 
-- David Kelley

Dude this is great stuff!  A for interesting, A for correctness)!
--Jeremiah Morrill

I really like the chapter now, Really good content. :) 
--Rene Schulte

Reading the early release of @waltritscher 's HLSL for XAML developers book. Very good so far.
   -- Kris Athi

Learn more about shaders, get the book

HLSL and Pixel Shaders for XAML Developers

You probably know about the “Add as Link” feature in Visual Studio.  When adding an existing file to a project, you can choose “Add as Link” in the drop down and the file stays in the original location instead of being copied to the new project folder.


When you add an existing file to a project, the default option is to copy the file to the folder where your current project resides. If you want to instead link to the file (rather than actually moving the file to that folder) you can do so by choosing Add as Link… –MSDN

Linking to another folder

But what if you want to link to the the entire contents of a folder and have all the files available in the new project?  You could add the files one at a time, but that is tedious. Instead you can add wildcards to the csproj/vbprog file and get all the files added automatically.


To get the correct XML in the csproj file I start by adding a link to a single file that is in the desired source directory.  Once that is done, I open up the csproj file and find the link to the file. 

Then change the XML as follows.


The first line (Compile) indicates the source directory. The wildcards work as you expect, *.* indicates that we want all the files.   Note that it is a relative path from your current project. 

The second line (Link) instructs MSBuild to add links to the files found in the source directory.    %(RecursiveDir ) means to walk any children directories when linking the files.  %(FileName) means to use the existing file name, and %(Extension) means to use the existing file extension. Here’s a link to the MSDN docs explaining the %  tokens.


Note:  Visual Studio does not automatically refresh the file list when a file is added, renamed or deleted from the linked folder while the project is open.  The project needs to be reopened for the changes to appear.

Windows phone 8.1 has little changes and enhancements that are not covered in the mainstream articles.   This series of posts examines the gems hidden everywhere in the new OS.

More posts in the “Windows Phone 8.1 What’s New” series


Now there is a quick way to change the case of a word or phrase is selected in the text editor.  This example is in the Windows Phone 8.1 mail client but it works in most places you edit text.

Select the word or phrase. Tap the “Shift” key.  Each time the shift is tapped the casing changes (Lowercase, Sentence case, All Caps).



Figure 01:  Lowercase



Figure 02: All Caps

Windows phone 8.1 has little changes and enhancements that are not covered in the mainstream articles.   This series of posts examines the gems hidden everywhere in the new OS.

More posts in the “Windows Phone 8.1 What’s New” series

Auto Updates

Nobody wants to deal with app updates.  Microsoft learned this fact by observing the behavior of millions of Windows and Windows Phone users.  So they’ve changed how app updates get installed on your PC and your Phone. 

On Windows Phone 8.1 an app is automatically updated as soon as the update appears on the Microsoft servers.  At least that’s the default behavior.  You can change how updates are applied by opening Settings, swiping to the Applications tab and choosing Store.



Figure 01: The Settings/Applications screen


If you like the tedium of approving updates every few days in the Store app you can disable the automatic updates   Also you can choose whether apps are updated via Wi-Fi only, which is good for ensuring you don’t inadvertently exceed your cell plan data cap.



Figure 02:  The Store Settings screen

Use Download History to see What’s Been Updated

It’s nice that auto update removes the need to habitually open the store app and install the updates.  But what if you want to know what apps have been updated.  Maybe you are tingling with anticipation to get the latest Angry Bird app update and you want to verify it’s been installed.

You’ll find the update history in the Store app. Open the menu on the bottom of store app, select downloads , then slide over to history section.



Figure 03:  The Store menu.


Figure 04:  The History screen.

If you have Windows Phone 8.1 and want to display it’s screen during a presentation try the Project my Screen feature.  You’ve probably heard of this feature, if not Cliff Simpkins has details on how to install and use the feature.

Essentially you install an application on your computer and enable the feature on the phone.  Run the desktop application on the computer. When you connect the phone to the computer via USB you see this prompt on the phone.



If you choose Yes, your phone screen is shown in the desktop app (and can be shown on a conference projector).

Did you know the connection is bidirectional?

I’ve been using this feature for a couple days but I had no idea that the connection went both ways.  I have a touch screen laptop.  I can touch the image projected on my laptop screen and remote control the phone.   Nice!


Shout out to Morten Nielsen for tweeting about this “feature”.

I purchased the inexpensive Motorola Moto G Android phone for $99 USD at the local Best Buy.  It’s a cheap way to get a test device for Android development.  The Verizon version is a no contract phone so you are not stuck with a two year contract.  If you want to use it as a phone you need to buy a monthly “pass” from Verizon ($45).  For my purposes I don’t want to pay for cell service, I plan on using it as a wi-fi phone only.  At first glance there doesn’t appear anyway to use the phone without signing up for at least one month service.  But there is a way to avoid the fee if you know the ninja swipe maneuver.

The activation screen

When you turn on the device you select your desired language, then the phone shows the activation screen. 


Figure 01: Phone activation screen


The instruction tells you tap the “here” link, which dials the activation service. When you are connected to the service a recorded voice asks you to enter your Zip Code so that it can assign a phone number to your new device.  The voice then tells you about the $45 a month plan.  Press 1 to sign up for the plan, press 2 to hear more details.  Those are the only two choices offered.  So it appears that you have no choice but to sign up for the one month of service. But don’t despair, there is a way through the activation process.

Bypass Activation Screen

Here are the steps to skip the activation screen.

While on the activation screen , pull down from the top edge of the phone to show the notification screen.


Figure 02: Notification screen


Touch the recent apps button on the bottom right of the screen.


Figure 03:  Press the recent app list


The Activation screen will  appear as a small icon on screen, swipe the activation app to the left side of the screen.


Figure 04: Swipe the activation screen to left


It’s just that simple, now you can continue with the setup process and have a wi-fi only phone.

The fine print

The activation screen reappears occasionally while using the phone.  I’ve seen it appear when restarting the phone.  It also might appear if you try to dial a phone number.

I can tolerate these small annoyances on a phone that is only used for testing.  What about you?

Another option

If you want to get a unlocked, no contract version of the Moto G, it’s available on Google Play for $200.

Windows phone 8.1 has little changes and enhancements that are not covered in the mainstream articles.   This series of posts examines the gems hidden everywhere in the new OS.

More posts in the “Windows Phone 8.1 What’s New” series

One of the features that I love about Windows Phone 8.0 is the ability to pin a contact to the start screen.  That makes it easy to see your friends status, send them a message or call their phone. The new 8.1 OS adds a small enhancement for quickly calling your favorite phone numbers.

Speed Dial

Version 8.1 adds a new Speed Dial section to the call history screen.  It shows a list of contacts, you simply touch the contact to dial the number.



Figure 01:  Speed dial screen



Figure 02: Dialing the contact


How is this different from calling via the pinned tile?  Touching the tile on the start screen takes you to the contact page, where you select phone number to call.  With the speed dial, once you have the history page open you can quickly call anyone on the list without looking at their contact information.

Adding a Speed Dial Entry

Touch the + button on the Speed Dial AppBar.  The contact list opens and you choose the contact to add. If they have more than one phone number you pick the number to add to the speed dial list.


Figure 03:  Choosing a speed dial number



Figure 04:  Speed Dial screen with new entry

Windows phone 8.1 has subtle changes and enhancements that are not covered in the mainstream articles.   This series of posts examines the gems hidden everywhere in the new OS.

More posts in the “Windows Phone 8.1 What’s New” series

Call History UI changes

Microsoft changed the UI in the Call History screen.  The Call button is gone, replaced with the new Contact Button.

Windows Phone 8.1

Here is the history screen in 8.0.


Figure 01:  Windows Phone 8.0 Call History screen


On the left side of the screen is the Call button.  Obviously pressing this button calls the phone number.  Pressing the contact name or phone number in the history list takes you to the contact screen, where you can view and edit their contact information.


Windows Phone 8.1

Here’s the history screen in 8.1.


Figure 02:  Windows Phone 8.1 Call History screen


The Call button is gone. To call someone in the list you press their contact name or number.  I suspect that will trip up a few people who are familiar with the old system. On the right side of the screen is the new Contact button.  Press it to navigate to the the contact screen, where you can view and edit the contact information.


Figure 03:  The Contact screen

Windows phone 8.1 has little changes and enhancements that are not covered in the mainstream articles. This series of posts examines the gems hidden everywhere in the new OS.

More posts in the “Windows Phone 8.1 What’s New” series

Call History

There are a some changes in the History section of the phone dialer. Repeat calls to the same phone number are grouped together on the history list.


Figure 01: Windows Phone 8.1 History screenshot


As you can see I made two calls to the 555-0101 number, indicated with the (2), then I called the 555-1888 number [*].  Next were four calls the the 555-0123 number.  Finally I redialed the 555-0101 number again.  Because I made calls to other numbers before redialing 555-0101 the group count is reset.

In the Windows Phone 8.0 history list each phone call is a separate entry.  So this  8.1 enhancement reduces the number of items shown in the history list

Searching History

The grouping disappears when searching the history list.


Figure 02:  Searching History screenshot


When I touch the search button, the list updates to show the individual calls.


Figure 03: Search results screenshot


The grouped data is not shown in the search results either. As you can see each individual phone call is listed separately.


[8] More information about U.S fictional phone numbers.


Until now, there has been no easy way to interact with MIDI devices in a Windows Store App.  But that changes today.  You can install the Windows Runtime API for MIDI Preview Nuget package in your project and start using MIDI in your app.


Unless you are music synthesizer devotee you probably don’t know much about Dave Smith.


He was big force in the early days of digital music, founding the pioneering Sequential Circuits company in 1972.  During his tenure at Sequential Circuits he designed and built the first programmable polyphonic synth. He was also responsible for writing the first digital communication protocol specifically targeted at music instruments.  That protocol, named  MIDI (Musical Instrument Digital Interface) was ratified by the music industry in 1983 and it changed the way musicians, producers and studio engineers worked with their tools.

What is MIDI?

First and foremost it is a serial protocol that defines how to send messages between devices.  If you want to explore the geeky details of the specification check out the midi.org site.  MIDI also defines what types of messages are allowed.  Some common examples are note-on, note-off, note-pitch, pitchbend, volume, controller-info (footswitch, knobs, sliders, pressure, velocity), program-change, time-code and clock.

Instrument Explosion

Nowadays MIDI is built into numerous devices. 

  • Music Keyboards
  • MIDI controllers
  • Rack Mounted synthesizers
  • Drum machines
  • Computer music interfaces
  • Electronic drums
  • Hardwar Sequencers
  • Wind Controllers
  • Digital Audio Workstations


This universe of devices is now available from your Windows Store App.  Essentially you can find attached devices and then read inbound data from a controller, or send control information back to the device. As a keyboard player I find this very exciting.  What do you think?

Beta API

At the moment, the Windows Runtime API for MIDI Preview is in Beta and Microsoft is actively seeking your input on what enhancements should be added to the API.

The Microsoft Build 2014 conference is this week. There is an avalanche of information flowing from the Redmondites on the future of Microsoft products and the changes to developer tools. One announcement caught my ear, the changes in the Windows 8 sandbox for Windows Store Apps.


Windows 8 store apps run inside a sandbox, which force the application to use approved WinRT APIs and prevent the application from damaging or infecting the host operating system. This is a good strategy for consumer apps but it limits what you can do with corporate applications. For example you can’t call certain .NET libraries within a store app.

The solution is to avoid making store apps and develop desktop appications instead. Now you have access to the powerful WPF GUI system and the full .NET framework. But you are missing out on some of the innovations available in the Store APIs and are prevented from using the new Windows 8 features. For example the touch system is much easier to work with in the modern libraries.


The forced separation of WinRT and .NET ends with the release of Windows 8.1. Now developers creating corporate apps can use any .NET library from within their WinRT apps. This is good news. It means that you have access to all your custom .NET libraries written for your existing projects. Plus you get access to the huge world of third party .NET code written during the last twelve years.

Now you can leverage your custom business layers written for .NET, and build a modern, sleek, touch friendly front end for your existing systems.

The Fine Print

You only get this “interop feature” if you side load the application. You cannot distribute your app through the Windows Store. That, of course, means that you have to have a way to sideload apps onto employees computers. Usually that entails having a Intune subscription for your company or buying packets of 100 sideload keys. This is a contentious topic, the past couple years have seen a lot of complaints about the current sideloading costs and limitations in the developer community. But those stipulations are changing too.

My sources at Microsoft confirm there are changes in the sideloading licensing costs and restrictions but details on the changes have not been announced.


Microsoft has released some information regarding the changes to sideloading. Rocky Lhotka tells the story on his blog.

Microsoft has now radically changed the cost of step 1. This blog post from Microsoft contains the following statement:

Enterprise Sideloading– In May, we will grant Enterprise Sideloading rights to organizations in certain Volume License programs, regardless of what product they purchase, at no additional cost. Other customers who want to deploy custom line-of-business Windows 8.1 apps can purchase Enterprise Sideloading rights for an unlimited number of devices through Volume Licensing at approximately $100. For additional information on sideloading licensing, review the Windows Volume Licensing Guide.

Older Posts »