Pages

Showing posts with label CodeProject. Show all posts
Showing posts with label CodeProject. Show all posts

Friday, 31 August 2012

Creating a Simple Windows 8 Game with JavaScript: Part 1 – Windows 8 App Basics


Creating a Simple Windows 8 Game with JavaScript: Part 1 – Windows 8 App Basics
This is the first in a series of posts that will show you to create a (very) simple Windows 8 game. We’ll be using HTML5, JavaScript, WinJS, and some helpful libraries from CreateJS along the way.

The game is based on the XNA sample game "Catapult Wars Lab". We’ll reuse the assets from that game as we develop a new version for Windows 8 that’s based on web technologies. This game focuses on simplicity, so there are a number of intermediate techniques that aren’t used in this sample.

Read More On CodeProject

Monday, 13 August 2012

Synchronous to Asynchronous Explained


I've posted several articles about the new async and await keywords that are available in Visual Studio 2012, but I still see some people struggle with the concept. How do you make a task asynchronous? When and where do you use the async keyword?

The answer is not simple because the need to process asynchronously depends on a variety of factors. There is overhead when you create a thread. It allocates memory and creates a new synchronization context. Having a thread communicate with other threads is even more expensive and adds complexity to your code. Fortunately, the teams at Microsoft introduced the Task Parallel Library to help simplify how you work with threads. I strongly recommend learning as much as you can about the Task object if you wish to master asynchronous programming.

Read full article here

Wednesday, 8 August 2012

How to Add Common Functionality to the Grid Template (Metro Style Apps Using JavaScript and HTML)

You can extend the Microsoft Visual Studio Grid Application template to include additional core functionality that adds value to your application. This tutorial is meant to be used with Microsoft Visual Studio 2012 RC on Windows 8 Release Preview. You can find the app package for the completed tutorial here.

This is the default Grid Application template landing page.
Screen shot of the default grid application template landing page
After completing the tutorial, your app will have multi-sized items that use different templates.
Screen shot of grid app with multi-sized items with different templates

Read full article herehttp://www.codeproject.com/Articles/434181/How-to-Add-Common-Functionality-to-the-Grid-Templa

Saturday, 28 July 2012

Drawing / Inking API in WinRT (C#)

If you are planning to develop an application that is going to have the drawing capability, one of the first namespaces to resort to in WinRT is the Inking namespace. Using the InkManager in Windows 8 (Metro) applications, you can:

  • Draw ink strokes
  • Capture ink strokes
  • Render Strokes on a Canvas using different geometries
  • Select Strokes
  • Delete Strokes
  • Save and Load Strokes
  • Convert strokes to text through handwriting recognition
  • Copy/Paste strokes from the clipboard
  • Hit Test the pen input

In  this article, we will be talking about different methodologies for rendering the pen input on the Canvas element on Metro applications.

You can get the complete solution that will be used as the example from TechNet : Windows 8 Input: Ink sample in C#/Xaml

Read full article here
Download My Metro Paint App

Tuesday, 24 July 2012

Creating beautiful views for local files in your metro app

Part of Metro style design is building clean views that allow content to shine and help users accomplish their tasks. We explore in particular how you can create beautiful galleries with content from user’s files and folders on the local file system. Being able to display local content is a key requirement for many gallery apps that let users browse and consume their content – photos, videos, music, or documents. Windows 8 provides tools to do this in a simple, efficient, and customizable way.

To show this I’ll take the example of the PhotoJournal app, a connected photo journal where users can view and manage their photos and videos using a timeline view. In the next figure, you can see the landing page of the app. A typical example of a view that this app creates over the file system is a timeline view, which shows photos recently published in the app and stored in the app’s local data folder. Another is a search results view that lets the user find specific photos. In this post, I’ll go through the two steps the app takes to build these views:
Creating beautiful views for local files in your metro app


Read full article here

Thursday, 12 July 2012

Metro Paint : A XAML/C# App For Drawing & Hand Writing Recognition

This Metro style application is for drawing basic shapes like line, rectangle, circle, ellipse, free hand shapes, eraser, and clear screen. It also provides a feature to choose stroke thickness, border colour, ,fill color and handwriting recognition. It allows to save the recognized text as text file and only ink strokes can be saved as image. It is in the initial version so there are some limitations like saving whole drawing as image, resizing and moving of the drawn components etc.


Metro Paint  : A XAML/C# App For Drawing & Hand Writing Recognition

Read full article here

Friday, 22 June 2012

Windows 8 JavaScript Metro Application–Getting Started

Couple of mounths ago I wrote about My First Windows 8 Application – Metro Puzzle when using Windows 8 Developer Preview, since than things has changed.

Windows 8 JavaScript Metro Application–Getting Started


In this article I'll show the new Windows 8 JavaScript development process and couple of features for Metro apps.
•Getting Started
•Settings
•MessageBox
•Splash
•Asynchronous Programming & App Storage

Read full article here

Using Bing Maps For Windows 8 Metro Apps - C# / JavaScript

Bing Maps SDK is available for Visual Studio 2012 RC and Windows 8 release preview, Bing Maps SDK is easy fast and cool control that you can use in your Metro App.

Bing Maps SDK for Metro style apps (Release Preview) combines the power of Windows 8 and Bing Maps™ to provide an enhanced mapping experience for Metro style apps. This SDK includes controls for apps built using JavaScript, as well as apps built using C#, C++, and Visual Basic.

Read full article here

Wednesday, 20 June 2012

Working with IAsync* WinRT Methods

Working with IAsync* WinRT Methods

Metro style applications built on the Windows Runtime are especially sensitive to any delays in the UI thread. Users will immediately notice when the UI trails their touch input and “doesn’t stick to their finger.” Animations that stutter and skip are immediately visible. Any lag in processing negatively affects the experience and the perception of not only your application, but the platform as a whole. A good way to help ensure your application doesn’t get into this state is to make long-running calls asynchronous. In this article, based on chapter 3 of Windows 8 XAML in Action, author Pete Brown discusses the Windows Runtime approach to asynchronous code.

The Windows Runtime was built with the concept of asynchronous operations. It was also built with the idea that these asynchronous operations must work not only for C#, but also for JavaScript, C++, and any number of other, very different languages. For those reasons, the team didn’t take a dependency on the Task Parallel Library in .NET, but, instead, created an interface-based approach consistent with the rest of the Windows Runtime.

The Windows.Foundation namespace contains the types and interfaces required to support asynchronous functions in WinRT. Every asynchronous operation implements, at a minimum, the IAsyncInfo interface. Like most programming problems, there is an easy but limited way to do async and a more complex but capable way.

In this article, we’ll look at the different approaches for using the WinRT asynchronous APIs; that is, the ones which return IAsync* interfaces. I’ll cover the easiest approach and then look into what’s needed to check progress or cancel an asynchronous operation.

Read full article here
Web Informer Button