Windows 8

50 design templates for Windows Store apps

I recently tweeted about some upcoming new design templates. At that time these templates were not released yet. Today I stumbled on them again. And it turns out that they are available for free on codeplex. You can see them all here.

It’s not recommended to uses these templates as is. They’re provided as Visual Studio solutions in C# and JS and you should change the design to match your brand, of course.

UPDATE May 9th 2013:
Added 10 more templates to the list.

Here’s the entire list again. Click on the image to go to the template.

 Windows 8 App Design Reference Template: Block Style Color Block Style Color template will help if you want to build an app which needs a Variable Size Content display blocksThe Block Style Color template contains placeholders for Category and Detail Page. You can leverage this style if your implementation scenario is closest to this template.
 Windows 8 App Design Reference Template: Block Style Picture Block Style Pic template is an emulation of a data storage app with placeholders for category and details data.
 Windows 8 App Design Reference Template: Brick Style Brick Style template will help if you want to adopt a brick style variable size display in your app’s hub page.
 Windows 8 App Design Reference Template: Cook Book Cook Book template will help if you want to build an app which has the following ingredients:

  • Group display
  • Category display
  • Recipe detail display

Making use of this template you can create any Cookbook app.

 Windows 8 App Design Reference Template: E-Commerce Electronics E-Commerce Electronic template will help if you want to build an app which has the following ingredients:

  1. Category Display
  2. Group Category Display
  3. Category Detail Display
  4. Detail Display
 Windows 8 App Design Reference Template: E-Commerce Fashion E-Commerce Fashion template will help if you want to build an app which has the following ingredients:

  1. Category Display
  2. Group Category Display
  3. Category Detail Display
  4. Detail Display
 Windows 8 App Design Reference Template: Finance Finance Template will help if you want to build an app which has the following ingredients

  1. Chart & Market Indies Display
  2. Market Indies Display

The finance template is an emulation of a Finance app with placeholders for Chart and Market Indies data. Making use of this template you can create any Market Watch app.

 Windows 8 App Design Reference Template: Food and Dining The Food and Dining template is an emulation of a Recipe app with placeholders for various category of recipe, Ingredients and Instruction.
 Windows 8 App Design Reference Template: Food Light Food Light Template will help if you want to build an app which has the following ingredients

  1. Recipe Details
  2. Restaurant

The Food Light template is an emulation of a Recipe app with placeholders for various category of recipe, Ingredients and Instruction.

 Windows 8 App Design Reference Template: Health & Fitness The Health & Fitness is an emulation of a fitness app with placeholders for Category, Group Category, and Detail data. Making use of this template you can create any fitness app.
 Windows 8 App Design Reference Template: Invitation The Invitation template is an emulation of an invitation app with placeholders for event category, catalogue, details and review share data. You can also share the created invitation through share source.
 Windows 8 App Design Reference Template: Music Music Template will help if you want to build an app which has the following ingredients

  1. Music Category Display
  2. Playlist Display
  3. Music Player
 Windows 8 App Design Reference Template: News Dark News Dark Template is an emulation of a News app with placeholders for News category and News details.
 Windows 8 App Design Reference Template: News Grey News Grey Template is an emulation of a News app with placeholders for News category and News details.
 Windows 8 App Design Reference Template: News Variable Tile News Variable Tile Template is an emulation of a News app with placeholders for News category, Group Category and Detail data.
 Windows 8 App Design Reference Template: Photo Browser Photo Browser template is an emulation of a Picture browser app with placeholders for Category, Group Category, and Detail Data. Making use of this template you can create a Photo Browser app.
 Windows 8 App Design Reference Template: Shopping Shopping template will help if you want to build an app which has the following ingredients

  1. Product Category Display
  2. Product Catalogue Display
  3. Product Details Page

The shopping template is an emulation of a shopping app with placeholders for product category, catalogue and details data. Shopping cart and eventual payment features are left out of the template intentionally as they are better dealt during actual implementation.

 Windows 8 App Design Reference Template: Travel Dark Theme Travel Dark Background template is an emulation of a travel app with placeholders for Vacation destination, group destination and destination detail data. Add to favourite features are left out of the template intentionally as they are better dealt during actual implementation.
 Windows 8 App Design Reference Template: Restaurant Restaurant template is an emulation of a Restaurant app with placeholders for Restaurant category, Restaurant Details. Booking Table and eventual payment features are left out of the template intentionally as they are better dealt during actual implementation.
 Windows 8 App Design Reference Template: Tutor Advanced Tutor Advanced Template is an emulation of a tutor app with placeholders for Category, Gallery, and Detail data.
 Windows 8 App Design Reference Template: Tutor Tutor template is an emulation of a tutor app with placeholders for category, catalogue and details data.
 Windows 8 App Design Reference Template: Baby Journal Baby Journal Template is an emulation of a Baby Journal app with placeholders for Category, Gallery, and Detail data. Making use of this template you can create a Baby Journal app.
 Windows 8 App Design Reference Template: Basic Game Basic Game template will help if you want to build an app which has the following ingredients

  1. Game Category Display
  2. Game Catalogue Display
  3. Game Page
 Windows 8 App Design Reference Template: Blocks Blocks template provides navigation placeholders in the hub page followed by content blocks in the details page.
 Windows 8 App Design Reference Template: Forum Forum template will help you build an app which has elements of connecting to various discussion groups.
 Windows 8 App Design Reference Template: Drawing Drawing template is an emulation of a Painting app with placeholders for Colour selection and Tool Box.
 Windows 8 App Design Reference Template: ECommerce Jewellery E-Commerce Jewellery template is an emulation of a Shopping app with placeholders for Category, Group Category, and Detail Data. Making use of this template we can create any Ecommerce app. Shopping Cart functionality is left out of the template intentionally as they are better dealt during actual implementation.
 Windows 8 App Design Reference Template: Fitness Fitness template is an emulation of a health and fitness app with placeholders for Category, Group Category, and Detail data.
 Windows 8 App Design Reference Template: Food Variable Food Variable template is an emulation of a Recipe app with placeholders for various category of recipe, Ingredients and Instruction.
 Windows 8 App Design Reference Template: Health Management Health Management template is an emulation of a personal health manager with placeholders for Profile, Reports and Patient details.
 Windows 8 App Design Reference Template: Language Convertor Language Converter template is an emulation of a Language Translator app with placeholders for Category Selection, Choose Scenario and Translate.
 Windows 8 App Design Reference Template: Lifestyle Lifestyle Template will help if you want to build an app which has the following ingredients

  1. Restaurant Search
  2. Food, Nightlife and Events Search
  3. Today’s Happening
 Windows 8 App Design Reference Template: Matching Matching Template will help if you want to build an app which has the following ingredients

  1. Choose the Best
  2. Matching Pattern
 Windows 8 App Design Reference Template: News and Weather News and Weather template is an emulation of a News app with placeholders for Grouped Items, Weather, and Detail data.
 Windows 8 App Design Reference Template: News Big Image News Big Image Template is an emulation of a News app with placeholders for News category, Group Category and Detail data.
 Windows 8 App Design Reference Template: News News template is an emulation of a News app with placeholders for News category, article and video data.
 Windows 8 App Design Reference Template: Notes Notes Template will help if you want to build an app which has the following ingredients

  1. Calendar Display
  2. Overdue Display
  3. Task Display
 Windows 8 App Design Reference Template: Pillar Block Pillar Block template is an emulation of a Pillar Block app with placeholders for category Display (Local News, Local Events etc.), and details.
 Windows 8 App Design Reference Template: Planning Diary Planning Dairy Template will help if you want to build an app which has the following ingredients

  1. Schedule Tracking
  2. Schedule Planning
 Windows 8 App Design Reference Template: Product Product Template is an emulation of a shopping app with placeholders for Category, Group Category, and Detail data.
 Windows 8 App Design Reference Template: Recipe Recipe template is an emulation of a Recipe app with placeholders for Recipe List, Recipe details data.
 Windows 8 App Design Reference Template: Shoe Store Shoe store template is an emulation of a Shopping app with placeholders for Category, Group Category, and Detail data.
 Windows 8 App Design Reference Template: Solution Solution template will help if you want to build an app which has the following ingredients

  1. Topics Display
  2. Query Solution Display
  3. Query logging
 Windows 8 App Design Reference Template: Standard Square Standard Square template will have a Square tile with placeholders for product category and details data.
 Windows 8 App Design Reference Template: Text Keyboard Text Keyboard template is an emulation of a Keyboard with placeholders for the text keys.
 Windows 8 App Design Reference Template: Tracking Tracking template is an emulation of tracking apps with placeholders for category and details data. Add, Delete and Refresh are left out of the template intentionally as they are better dealt during actual implementation.
 Windows 8 App Design Reference Template: Translator Translator template is an emulation of a translating app with placeholders for translating one language to other. Select language features are left out of the template intentionally as they are better dealt during actual implementation.
 Windows 8 App Design Reference Template: Travel and Tourism Travel & Tourism template is an emulation of a travel app with placeholders for Summary, Category, and Detail data.
 Windows 8 App Design Reference Template: Travel Light Theme Travel light theme is an emulation of a travel app with placeholders for Summary, Group summary, and Detail data.
 Windows 8 App Design Reference Template: Travel Picture Travel picture template is an emulation of a travel app with placeholders for Vacation destination, group destination and tour detail data. Enquire and Bookmark features are left out of the template intentionally as they are better dealt during actual implementation.
Windows 8 App Design Reference Template: Financial Adviser Financial Adviser template will help if you want to build an app to manage personal finances.
Windows 8 App Design Reference Template: Unit Convertor Unit Convertor will help if you want to build an app that brings in various conversion logic/units under one roof.
Windows 8 App Design Reference Template: News Light Theme News Light Theme will help if you want to build an app which has the following ingredients

  1. News Category Display
  2. Article Display
  3. Video Page
Windows 8 App Design Reference Template: Food The Food Template is an emulation of a Recipe app with placeholders for different Categories.
Windows 8 App Design Reference Template: Simple Grid The Simple Grid will help if you want to build an app which has a uniform display of tiles which are proportionate.
Windows 8 App Design Reference Template: Variable Grid Style A The Variable Grid Style A Template will help if you want to build an app which has an option for an image followed by uniform display of tiles which are proportionate
Windows 8 App Design Reference Template: Variable Grid Style B The Variable Grid Style B Template will help if you want to build an app which has an option for an image followed by uniform display of tiles which are proportionate
Windows 8 App Design Reference Template: Variable Grid Style C The Variable Grid Style C Template will help if you want to build an app which has an option for an image followed by uniform display of tiles which are proportionate
Windows 8 App Design Reference Template: Variable Grid Style D The Variable Grid Style D Template will help if you want to build an app which has an option for an image followed by uniform display of tiles which are proportionate

Telerik Accelerator Challenge

Just wanted to share this challenge my good friends over at Telerik are holding at the moment. Telerik is looking for awesome Windows Store app ideas.

If you are a startup and have a great idea for a Windows 8 app this might be a great opportunity for you. You’ll have to enter your idea by March 15. Five teams will than be shortlisted. If you make it to the list, the judges will interview your team in early April.

And if the judges pick your idea, you’ll get $30K of funding, a 1 week bootcamp in Hong Kong and 3 months of virtual mentorship.

You can enter here.

Accelerator_illustration_small

WinJs DesignTime Mode

While working on the port of my game Orbizoid to Windows 8 I ran into an issue with the starfield in de background of the game. The starfield was running in Expression Blend too. At first this was kinda funny, but soon the performance dropped and it became unworkable. There used to be a property to detect if you are running inside Expression Blend before, I hoped this was still available when working on Windows 8 applications in javascript. I had to search for a moment, but it is possible.

var isInDesigner = Windows.ApplicationModel.DesignMode.designModeEnabled;

if(!isInDesigner){
// code not running in Expression Blend
}

now you can safely use the isInDesigner variable throughout your code to enable/disable specific code running in Blend.

Discovering Expression Blend 5 – ListView

Often you need to display a list of items in a application. The Windows Library for JavaScript contains a ListView control for you to use in your applications. The control can be bound to a data source and templated from HTML.

Getting started

We’ll start off by creating a new project and choosing the Fixed Layout Application project template.

image

As you can see, the template has added a paragraph (p) to the tree which contains some text. You can use that to place the title of your application. The ListView is going to be in the same div as that paragraph.

You can add the ListView by hand, typing the HTML, but I personally prefer dragging and dropping controls onto the designer. Select the parent div of the paragraph.  image

Type ListView in the search box of the Assets panel and drag the result from the list to the design surface.

image

If you switch to Split view in the designer you can see the HTML …

imagewhich should contain the following element.

<div data-win-control="WinJS.UI.ListView"></div>

To be able to write code against the ListView it has to have an Id. You can enter this on the Attributes panel. In this case I named the ListView “posts”.

image

Getting Data

The ListView in this demo application is going to display the Atom feed from this blog. The Windows Library makes this very easy.

Have a look at default.js in your solution. This file contains some code to get you started. When the window is activated the onmainwindowsactivated function is called. This is where the retrieval of the atom feed has to be initiated. First create a new AtomPubClient and a Uri to the feed. Than, pass the url to the retreiveFeedAsync function and have it process the posts or handle the error. At the end of the function you have to call processAll to have all declarative bindings applied on the controls. This is needed to get the templating to work which we’ll create in a second.

I haven’t implemented error handling in the demo, only an empty function. The processPosts function will be implemented after the templated.

WinJS.Application.onmainwindowactivated = function (e) {
    if (e.detail.kind ===
     Windows.ApplicationModel.Activation.ActivationKind.launch) {

        var syn = new Windows.Web.AtomPub.AtomPubClientClient();
        var url =
           new Windows.Foundation.Uri("http://timmykokke.com/atom");
        syn.retrieveFeedAsync(url)
           .then(processPosts, downloadError);

        WinJS.UI.processAll();
    }
}

function downloadError() {
    // handle error
}

Creating a template

The template is created in HTML. It’s basically a div with the data-win-control set like the ListView. The children of that div are used as a template for the ListView.  The template has to be defined before the ListView. To get the bindings to work you’ll have to add the binding.js script to the head section of the HTML file.

The actual binding is done by adding the data-win-control attribute to the divs inside the template. In this case the innerText property of the div is bound to the title property of the data bound object. Note that the children of the template are not shown in the Live DOM panel.

I’ll demonstrate how to set the classes later.

<script src="/winjs/js/binding.js"></script>
...
<div id="itemTemplate" data-win-control="WinJS.Binding.Template" >
    <div class="post">
        <div class="title" data-win-bind="innerText: title"></div>
        <div class="summary" data-win-bind="innerText: summary"></div>
        <div class="date" data-win-bind="innerText: date"></div>
    </div>
</div>
<div id="posts" data-win-control="WinJS.UI.ListView" ></div>

To make the template known to the ListView, select it and go to the Attributes panel. Enter the name of the template in the textbox next to the itemRenderer property. In this case the templated is named itemTemplate.

image

Process feed

The feed returned by the earlier code has to be processed to match the template. It’s nothing more than creating an array (myDataSource), run over the items, adding anonymous objects to the array and setting the data source of the posts to it. If you would like to do some custom formatting on the items, like changing the date to something more readable for example, you can do that here.

function processPosts(feed) {
    var myDataSource = [];

    for (var i = 0, len = feed.items.length; i < len; i++) {
        var item = feed.items[i];
        myDataSource.push({
            title:   item.title.text,
            summary: item.summary.text,
            date:    item.publishedDate
         });
     }

     posts.winControl.dataSource = myDataSource;
}

One of the great things of working with Blend is that you do not have to run your application to see the result and work with it. Try hitting CTRL+R or click on the refresh button in the top right corner of the designer.

imageIf all code is correct you should see the ListView filled with titles and summaries. The Live DOM panel should be filled with elements now. The elements that are generated by code are added to the list to. These elements are marked with a small lightning  bold icon.

image

Now we have to make sure the ListView is showing a ListLayout. With the posts element selected in the Live DOM panel head over to the Attributes panel. Look for the layout property and hit the button next to it.

image

Select ListLayout from the list and hit Ok. Refresh the design if needed.

image

CSS for template

Now we have the ListView filled with data we can set the templates.

Try selecting a title of one of the posts. You might have to click a couple of times, and notice that with every click you drill a little deeper in the element tree.

image

With the element selected head over to the CSS Properties panel. Click on the little triangle and select Create style rule from selected element class… and title.

image

This will create a CSS style rule in default.css for the title class. It is automatically selected. Try changing some of its properties, for example the text color and font-size and see what happens. The height and margins of the programmatically added items is not recalculated on every change, so you may want to hit the refresh button every now and then to update it.

You can repeat the process for the summary and date template items too.

To see what items in the designer are affected by a CSS style rule, select one on the Styles panel. For example the .title rule. Notice how all titles got a green border in the designer and the elements in the Live DOM panel got a dark green background.

image

 

Wrap up

I hope that this tutorial has given you a start on how to use the ListView and how to use templating in Expression Blend. Other controls work in pretty much the same way. Feel free to drop my a line if you have any questions regarding this tutorial or anything else you run into.

For future tutorials on Expression Blend please subscribe to the rss feed or follow me on Twitter (@Sorskoot).

Twitter