My Blog is Moving

May 10, 2009

Hello valued readers,

I am moving my blogging efforts over to:

http://geekswithblogs.net/robertbunn/Default.aspx

See you there!

Bob

Advertisements

Packaging Microsoft Surface App for Deployment

May 6, 2009

After months of development I finally got around to packaging up my app for deployment in user mode on the Surface.  I did run into a couple of minor hurdles at first which I will share with you, and tell you how I got around them.  First of all, check out the documentation on the Microsoft Surface community site and the SDK.  In your root app directory you will see a file like myapp.xml which is generated by visual studio for you.

The following code example shows the default XML file.

<?xml version="1.0" encoding="utf-8" ?>
<ss:ApplicationInfo
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xmlns:ss="http://schemas.microsoft.com/Surface/2007/ApplicationMetadata">
  <Application>
    <Title>SurfaceApplication</Title>
    <Description>SurfaceApplication</Description>
    <ExecutableFile>SurfaceApplication.exe</ExecutableFile>
    <Arguments></Arguments>
    <IconImageFile>Resources\icon.png</IconImageFile>
    <Preview>
      <PreviewImageFile>Resources\iconPreview.png</PreviewImageFile>
    </Preview>
  </Application>
</ss:ApplicationInfo>

Notice in the <ExecutableFile> element, how it has “SurfaceApplication.exe” as the value?
It should really look like this:

%ProgramFiles%\Microsoft Surface\SurfaceApplication\SurfaceApplication.exe
The urls in your other elements like the previewIcon should follow the same format. Hopefully, this helps some people out.


Microsoft Surface – Customizing the look and feel of the ScatterViewItem (and other controls)

March 23, 2009

The ScatterViewItem is a very useful way to get the “surface feel” into your apps very quickly. However it is likely you will want to customize how your ScatterViewItem looks and reacts to user input. The following steps will help you customize it to your hearts content. This procedure could be applied generally to any other control as well.

1. Create a WPF application in Visual Studio, add a ScatterView and ScatterViewItem. Save the project.
2. Open project in Expression Blend.
3. Under Objects and Timeline, right click on the ScatterViewItem control, select Edit Control Parts (Template) -> Edit a Copy…
4. Give it a new name like ‘ScatterViewItem_Customized’ and click OK.
5. Save the project and return to VS. VS will prompt you to reload changed files.
6. Now you will have the entire default control template to modify to your hearts content.