Pages

Tuesday 31 July 2012

AdDuplex for Windows 8 is here!

AdDuplex for Windows 8 is here!

AdDuplex, the largest cross promotion network for Windows Phone apps, has launched the first cross promotion network for Windows 8.
Starting today developers of Windows 8 apps can help each other get more exposure for their apps for free by participating in the AdDuplex ad exchange program. At this time only the managed XAML/C#/VB metro-style apps are supported, but support for other app types is coming.
While the Windows 8 SDK is in beta, you will get a better exchange ratio on the AdDuplex network (0.9 instead of 0.8) as well as additional launch bonuses. The first 5 Windows 8 apps to launch on the network will receive 250,000 impression bonus that can be used to advertise both Windows 8 and Windows Phone apps.
As part of this release we had to make some changes to the underlying engine. AdDuplex for Windows 8 supports multiple ad sizes and image ads as well as other features that are coming soon. Therefore we decided to run the current (Windows Phone only) version and the new one in parallel for some time. You can download the SDK, samples and documentation as well as manage your Windows 8 apps at beta.adduplex.com

Using a provisional WinRT port of SilverlightSerializer to store state in MVVMLight ViewModels

Over 1.5 years ago I showed how to store your Windows Phone application state (‘tombstoning’) using SilverlightSerializer by Mike Talbot. In my quest to leverage hard-won Windows Phones skills to be usable in Windows 8 I made a provisional port of SilverlightSerializer 1 to WinRT. That is, in C#.

Since my win8nl library port is a bit behind, I’ve stuck the class in a simple project that you can download here and from codeplex

Usage is as follows: in App.xaml.cs, you define two methods: SaveState and RestoreState:

Read full article here

Everything you need to know to build HTML5 games with Canvas & SVG

Silverlight Metro Time Line Control

I’ve come up with a nice little user control that plots “activities” over the past couple of days.

And when I say I’ve come up with, I mean I was inspired by/copied the design from the new Microsoft Dynamics software.

It’s currently making use of the Telerik chart controls, as that’s what I am using at work but I’m sure that part could be swapped out for a Silverlight Toolkit chart.

Silverlight Metro Time Line Control

Read full article here
You can download the source:  https://github.com/stevenh77/FxChart

Attached Behaviors in WinRT Metro Style App

Although you don't get the convenience of the Drag and Drop approach to using Blend Behaviors many have become used to, the Attached Behavior pattern still works with WinRT XAML applications. Even better, the underlying mechanism is unchanged.

I have a confession to make. I was never a fan of the Blend Behaviors anyway. I think they add complexity where it's not necessary (and I could never recall how to manually add them to XAML by hand). I always preferred to implement the pattern as an attached property on a dependency object rather than extending the Behavior class from the Blend SDK. It might be because, when I learned the benefits of what would later be called the Attached Behavior pattern, it had yet to be supported by Blend.

Read full article here
Here is the Gist that contains the behaviours

The First Release of Metro PieChart Control

The First Release of Metro PieChart ControlSo I’m glad to announce that the first release of of PieChart Control for Windows 8 now Supports lots of interactive features like

- Support Default and Hole Type PieChart

- Legend and Tooltips

- Pushout feature for on Click events

- On Select and DeSelect Item from the PieChart


find below the download link for the assembly file Download Here
for source click here 

Extending WinRT: how to avoid constrains and expose C# objects hierarchy from WinMD library

Windows 8 programming model allows extending WinRT by implementing WinRT components. These components can be created by using any supported language (JS, C#, VB, C++) and can be consumed by all these languages as well.

Visual Studio provides WinRT library project template, thus creation of your first WinRT component is matter of seconds. Gradually, you will find that your code should follow some rules to stay compatible with WinRT. Most of these rules are not deal breaker, but sometimes they can make you scratch your head a bit.

For example, one of the rules for C# states that all public classes (except XAML controls) must be sealed and custom WinRT-enabled class cannot be inherited from another custom WinRT class. But what can be done to expose a complex hierarchy of objects via WinRT?

Read full article here

Why Would you Want to Write Applications for Windows 8 Now?

Last week, we had our first Windows 8 webinar titled, “Why build for Windows 8 and how RadControls for Metro can help.” One question that we attempted to answer is, “Why build for Windows 8 now?” “Why not wait until a future date when the platform is more stable?” These questions are valid from a consumer and an enterprise point-of-view and I’ll try to explain why we believe that you should start writing applications for Windows 8 today.

4 Solid Reasons to Start Building Today

Read full article here

Monday 30 July 2012

Working with OData and WinJS ListView in HTML5/JS Metro Style Application

In this post we will see how to consume Netflix OData feed in HTML based Metro Application. Movies information will be displayed as following. At the end of this post, we should have output as below,

Working with OData and WinJS ListView in HTML5/JS Metro Style Application

Netflix exposed all movies information as OData and that is publicly available to use. Netflix OData feed of movies are available at following location

http://odata.netflix.com/Catalog/

Essentially we will pull movies information from Netflix and bind it to ListView Control of WinJS. We will start with creating a blank application.

Read full article here

Working with GridView Control in WinRT C#/XAML Metro Style App

As I am continuing to learn WinRT and its component, I spent sometime learning new native controls that are available for use in Metro style applications designed for Windows 8.  One of those controls is GridView.  This control can be easily visualized by looking at Windows 8 start screen.  You see groups of tiles, scrollable horizontally.  This is what this control is all about: presenting a list of items in a horizontally scrollable container, which can be further grouped.  In the case of grouping, the control essentially just deals with list of lists.

Working with GridView Control in WinRT C#/XAML Metro Style App


In the example below I will be using data that comes from WCF SOAP based service.  It exposes a list of contacts, where each contract has just a handful of properties:

Read full article here
You can download the entire demo here

Replicating TargetNullValue in WinRT Metro Style Apps

There are times in this world when using binding statements, that you want to specify a default value for a property if the result provided is null. In a post found here by Jesse Liberty, he details how developers can utilize the TargetNullValue option within the xaml binding statement to provide this option.
Recently I’ve been porting my SaintsFC WP7 app over to Windows 8 metro app & I’ve found that this option is no longer available. It’s been confirmed that this will likely not be in the RTM version of Windows 8 either so here’s a workaround using a converter as a substitute. It’s a little more convoluted than a simple property within the binding but it will also be able to provide you with a more extensive feature set as a result.

Read full article here
Download source code from here

8FilesInABox : Access Dropbox in Metro Style



8FilesInABox : Access Dropbox in Metro Style


Description

8 files in a box is an app created by Infinite Square. With it, you can access your dropbox account from a Metro app. You can share link to a file/folder, set files as favorite to keep them available offline. The app can also be used from other app to pick a file.

Features

  • Access your dropbox files
  • Save files for offline access

Download from here

Free Homemade Chart and DatePicker Control for Metro Apps

Here is how the charts turned out (I’m not ready to share this code yet, but I will once I clean it up a little!) – The barchart is by be, and the Piechart by another developer, I just did the legends. I’ll ask him if he is fine with sharing, and I’ll post the code here.

Free Homemade Chart and DatePicker Control for Metro Apps

Free Homemade Chart and DatePicker Control for Metro Apps

Read full article here

Best practices when adding single sign-on to your app with the Live SDK

A few months ago I wrote about how to bring single sign-on and SkyDrive to your Windows 8 apps with the Live SDK. Since then we made the Windows 8 Release Preview publicly available and we’ve begun to see some inconsistency in the design patterns forming in how apps expose entry points for users to sign in, connect accounts or sign-out of their experience.

To help you with these design patterns, we put together some guidelines for apps that want to use a user’s Microsoft account. In this post I share those guidelines with you and show you some code for how to get started.

Best practices when adding single sign-on to your app with the Live SDK

 
There are three primary scenarios where your app might need to integrate authentication with Microsoft accounts:

  1. Your app requires the user to be signed in to work.
  2. Your app can work if the user isn’t signed in but provides a personalized experience for users that signed in.
  3. Your app has specific tasks that require Microsoft account sign-in such as integrating with SkyDrive or Hotmail.

Now let’s dive into the details of each of these.

Read full article here

Saturday 28 July 2012

Using HTML controls to create great Metro style apps

Using HTML controls to create great Metro style appsWith Windows 8, you can use HTML to build Metro style apps. What you might not realize is that by using HTML controls directly, you automatically get the new Windows 8 experience. We have done work in HTML so that you can build industrial strength apps that have touch capability while still maintaining the great flexibility of using HTML. We want you to quickly and efficiently build apps that shine.

In particular, we want you to continue to take advantage of common HTML controls like <button> so that you can create great Windows 8 experiences with your existing expertise. Windows 8 enables this with new implementations of the standard HTML controls that have Windows 8 experiences built into them. By default, all these standard controls have the new look and feel of Windows 8, a great touch experience, and strong localization and globalization support. By using these standard HTML controls, you can build great Metro style apps your customers will love, while still maintaining the flexibility you want from HTML.

Read full article here

Transforming SVG graphics to XAML Metro Icons

Transforming SVG graphics to XAML Metro IconsThis short article shows how to pimp your Windows 8 Metro apps with native XAML icons that are created from W3C Scalable Vector Graphics. SVG graphics are XML documents, and hence should be easily translatable into an other XML schema, such as XPS (the technology formerly known as ... Metro). Just like Metro XAML, XPS is a subset of XAML. Unfortunately its full object model is not implemented in Silverlight or Metro. In Windows, since the-OS-that-should-not-be-named, XPS is also used as print spooler format. This means that you don't even have to write an XSLT transformation to translate SVG to XAML: let the printer driver do the heavy lifting.

Read full article here

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

Thursday 26 July 2012

How we can develop metro app for Windows 8 in under 4 minutes or less ?

How we can develop metro app for Windows 8 in under 4 minutes or less ?


Developer Evangelist, Michael Palermo kicks off his new series today where he shows us how we can develop for Windows 8 in under 4 minutes or less. Today’s topic? How to get started developing your Windows 8 app by downloading and using Visual Studio Express.

Next Steps:
Step #1 – Download Windows 8 Release Preview and Windows 8 SDK
Step #2 – Download Visual Studio Express for Windows 8
Step #3 – Start building your own Metro Style Apps for Windows 8

If you're interested in learning more about the products or solutions discussed in this episode, click on any of the below links for free, in-depth information:

Read full article here

Sideloading a Win8 Metro LOB App for Testing Purposes

The Scenario


Sideloading a Win8 Metro LOB App for Testing PurposesSideloading is the term used for installing a Windows 8 Metro App without downloading it from the Windows Store.  Why it made me think of a line from Happy Gilmore, I’m not sure, but I’m going with it.  Sideloading is going to be a typical deployment scenario for line of business (LOB) apps, because they will be targeted and controlled and not meant for the general public.  While there is a fair amount of documentation on this topic and deployment in general, getting the steps straight for testing my proof of concept (POC) on a tablet without using Visual Studio took a little more thinking and tinkering than expected.



Read full article here

Making your Metro Icons Circled using Paint.NET: the quick way

In this quick tip I am going to demonstrate how to make your icons with a circle around using Paint.NET. Here are a few examples of when you would need a circle icon:

Making your Metro Icons Circled using Paint.NET: the quick way Making your Metro Icons Circled using Paint.NET: the quick way Making your Metro Icons Circled using Paint.NET: the quick way

NOTE: This post is not about App Bar Icons but about Metro Icons in general! The circle displayed on each button is drawn automatically by the Application Bar and should not be included in the source image!

NOTE: Paint.NET is a free image and photo editing tool for Windows released under Creative Commons license. So you are free to build whatever icons/images you prefer and use them in your WP7 apps! For more information you can also take a look at our previous post:  Creating WP7 Tile and Application Icons for FREE with Paint.NET

Read full article here

Nullable Dependency Properties and Binding


Author’s Note: If you’re here just for a solution and are not interested in the extraneous bits, click here to jump to the workaround details.

First, some background…

Let’s say you’re building a user control and one of your control’s properties needs to be a three state boolean (true, false, null).

No sweat, we’ll just create a nullable boolean (bool?) dependency property:
1
2
3
4
5
public static readonly DependencyProperty ValueProperty =
    DependencyProperty.Register("Value",
        typeof(bool?),
        typeof(TestControl),
        new PropertyMetadata(null));

Read full article here

Windows 8 Simulator : Explored

You may be thinking to yourself: “Self, I’d really like to get into Window 8 Metro style, but I don’t own a touch screen device or tablet. So, I’ll just wait until I get one.”

Wrong answer!

If you’re serious about app development, you’ll want to start now to get a jump on everyone else. And, believe it or not, you can start with what you already have.
The built in templates provide most of what it takes to make a good touch first app.  For most scenarios, sticking to the templates is the wisest course of action.
To see how your app will behave when your app is on a slate, you can use the simulator that’s built right into Visual Studio 2012.

Windows 8 Simulator : Explored


Read full article here

Async Task.Delay In C# Metro Style App Explained

Internal code for Task.Delay (.NET 4.5)
How to implement Task.Delay in 4.0
How NOT to implement Task.Delay 4.0.
Returning a Value
Dealing with Exceptions
Example Usage
Read full article here

Building Pie Chart for C#/XAML Windows 8 Metro Style App

I came to a point were I need to use a Pie chart for a Project if you tried to search online you will not find a free charting control so I decided to build one. there is a huge modification in .NET 4.5 framework specially when it come to Paths and drawing because of

  • Different namespaces
  • Performance enhancement
  • etc…

so I decided to build a charting library on my own and here I’ll give you an initial start on build a Pie Chart

Building Pie Chart for C#/XAML Windows 8 Metro Style App


Read full article here

MetroGridHelper for WinRT, a helper to get the alignment right

It’s already more than a year ago that Jeff Wilcox wrote the MetroGridHelper for Windows Phone. I’ve been using it a lot since then. But we now have the option to build WinRT applications, sadly without the MetroGridHelper.

Wait no more, I ported the code from Jeff and also modified it to fit the metro guidelines that exist for WinRT applications. I’ve had some help from Martin Tirion and Matthijs Hoekstra, both working as Evangelist for Microsoft in The Netherlands.

The result is something that helps me during the design of the Windows 8, WinRT, apps.

MetroGridHelper for WinRT, a helper to get the alignment right

 
You can simply install the NuGet Package. Through the console like this:

PM> Install-Package WinRT.MetroGridHelper

Read full article here

Wednesday 25 July 2012

Matthew Baxter-Reynolds' Programming Metro-style Apps Workshop (WINDOWS8-01-01)

Programming Metro-style Apps Workshops are a unique event in the UK designed to help developers get started on the road to building software for Windows 8 and Windows RT. We take you from the point of having done "Hello, world" and the basics and lift you up to the next level where you can start building real retail and line-of-business apps on the platform.


LEARN HOW TO:

We guarantee by the end of the session you'll have a firm understanding of Metro-style development on Windows 8 and Windows RT.

PROGRAMME     
  • How and why Windows was "reimagined"
  • The fundamentals of moving from .NET
  • Asynchronous programming
  • Sandboxing and protection
  • Unit testing
  • Working with SQLite
  • Sharing, search, notifications
  • Application lifetime and background activities
  • Packaging, private deployment, and store deployment
  • ...and more


Click here to register

Using UDP sockets to connect a Windows 8 Metro style app to a .NET Micro Framework device: Part 3

Using UDP sockets to connect a Windows 8 Metro style app to a .NET Micro Framework device: Part 1
Using UDP sockets to connect a Windows 8 Metro style app to a .NET Micro Framework device: Part 2

In part 3 post, I show how to have bidirectional UDP communication: The Win8 Metro style app will send messages to the Gadgeteer device which responds with ACKs.

About two-way communication


UDP socket communication involves a pair of endpoints. Each endpoint is made up of an IP address and a port. In my example, the addresses and ports are as shown in this graphic:

Using UDP sockets to connect a Windows 8 Metro style app to a .NET Micro Framework device

When the Metro style app sends a message, it picks a port number. In the examples here, the port is 56553. The number itself isn't all that important, and isn't something you'd typically try to control. The destination port, however, is more important - it needs to be known. As long as the originator knows the destination port, you can have two-way communication, as the destination is informed of the originating port and IP with each message.

Read full article here

Office 2013 Preview on a Windows 8 Tablet PC (Video)


Read full article here

How to add a settings menu (Flyout) in a Windows 8 Metro-style app

In Windows 8 development, there are some differences between the Javascript and XAML APIs. Some things are available in JS but not in XAML and vice versa. One example is the SettingsFlyout control. There is no SettingsFlyout control for creating a settings menu item in XAML, although that exists in JS. The de facto solution is to create your own custom page and show/dismiss it according to the settings charm events. As this is something that basically every Metro app (or “Windows 8 style application“) has to include, it’s fortunate that there’s now a bit less tiresome way of doing this.

Callisto control suite


I’m implementing the settings menu by leveraging SettingsFlyout control, available in Callisto control suite. Callisto is a community project led by Tim Heuer. The suite contains awesome controls for Metro style apps written in XAML. Download and install Callisto from here. After you’re finished, you can start playing around with Callisto, and implement the header menu using my sample code below.

Read full article here

Debugging WinRT/XAML bindings

Visual Studio 2012 may not (yet?) support debugging of XAML bindings debugging in WinRT/Metro-style applications in a way we’re used to from programming WPF and Silverlight (a.k.a. XAML breakpoints), but basic notifications of failed bindings in the output window seems to be present and working.

Debugging WinRT/XAML bindings

 
Let’s look at the basic set up (new blank application).

MainPage.xaml – DataContext is set to the same page class to keep it simple;  TextBlock’s text is bound to a MyBinding property.

Read full article here

Hardware accelerating everything: Windows 8 graphics

With Windows 8 we set out to enable all applications to have the beautiful and high-performance graphics enabled by modern graphics hardware.  This work builds on the well-established foundations of DirectX graphics, which have been providing an increasing breadth of APIs and capabilities. In Windows 7, we expanded the capabilities of DirectX to provide a common hardware-accelerated graphics platform for a broader range of applications. Whereas previously, DirectX mainly provided 3-D graphics, we added functionality for what we call “mainstream” graphics. Mainstream uses center on the typical desktop applications most people find themselves using every day, including web browsers, email, calendars, and productivity applications.  Windows 7 added two new components to DirectX: Direct2D for two-dimensional graphics (shapes, bitmaps, etc.) and DirectWrite for handling text. Both of these additions not only focused on performance but also on delivering high-quality 2-D rendering. With these additions, DirectX became a hardware-accelerated graphics platform for all types of applications. Indeed, we showed what a typical application could achieve by using DirectX when Internet Explorer 9 brought hardware-accelerated graphics to the web.  WinRT bring these capabilities to the full range of new Windows 8 applications.  In this post, authored by Rob Copeland the group program manager on our Graphics team, we look at the details behind the scenes in enabling this new class of graphical application.  --Steven

Read full article here

Microsoft Details Windows 8 Graphics, Showcases Power Gains


With Windows 8 coming on October 26th, Microsoft has been publishing a number of insightful looks at some of the system's underpinnings. It's been pretty fascinating to watch. With prior Windows releases, there really hasn't been too much pre-release outreach with the public. But in a word where social media rules and communication is expected, these "Building Windows 8" columns act to give users of both avid and casual backgrounds an ability to see what's going on behind the scenes.
The latest post involves a dear subject: graphics. It reminds us that Windows 7 added two new components to DirectX: Direct2D for two-dimensional graphics (shapes, bitmaps, etc.) and DirectWrite for handling text, but things are evolving even further in Win8 / WinRT. DirectX became a hardware-accelerated graphics platform for all types of applications, and even Windows RT will be able to take advantage.

Read full article here

Share contract and custom data. Do you need a reference implementation for schema.org formats?

Windows 8 style apps can use contracts to interact with each other. For example Share contract allows sharing of various data between totally independent apps. As long as app follows Share target contract it can receive text, HTML, links, files, images and custom data. For source apps sharing data in the standard formats is pretty straight forward – DataPackage class provides corresponding functions SetText(), SetUri(), etc. All what you need is to call function and target app will get the data.

Custom data is a different story.

DataPackage.SetData() accepts two parameters – format id and data object. You can use your own "my-super-data" format id but nobody knows about this format and no one application will be able to receive your shared data. That’s why Microsoft suggests using for data sharing formats defined by schema.org (e.g. http://schema.org/Book) – by doing this you can be sure that at least some of apps will know about your package format

Read full article here

Page Navigation in Windows 8 JavaScript Apps

I’d like to talk a bit about navigating in Metro apps using HTML/JavaScript. There are a few options for doing so, and as you probably know whenever there’s more than one way to do things, then you the developer have power but not necessarily clarity.  The latter is what I hope to offer here.

First of all, the HTML/JavaScript that Metro apps are based on are identical to the HTML/JavaScript that websites are based on. It is entirely based on the standards. This is good because proprietary things are bad - generally speaking. This means that you can navigate exactly like you do in websites, but don’t. I’ll explain why not.

Page Navigation in Windows 8 JavaScript Apps


Read full article here

Tuesday 24 July 2012

Windows Runtime Support in ReSharper 7

The forthcoming release of Windows 8 introduces the new Windows Runtime programming model (also known as WinRT). Since WinRT can be programmed in languages that ReSharper already supports (C#, VB.NET and JavaScript), it’s only natural that ReSharper 7 comes with comprehensive support for WinRT development.

C#, VB.NET and XAML Support


ReSharper continues its support of C#/VB.NET and XAML files with the following features:

  • Code completion is provided in both code and XAML files. In XAML, ReSharper is aware of the new namespaces and URL formats, and is capable of offering correct completion options depending on context:

Windows Runtime Support in ReSharper 7
 
Read full article here

The Unsung Story of the Windows 8 Desktop

When developers first got their hands on the Windows 8 Developer Preview, I heard some comment that it was Windows 7 with some touch-friendly menus added in Metro. While most now know that is far from the case, there is a heavy focus on the Metro-style features and I think it is easy to miss the long list of features that are available in Windows 8 on the desktop. To address this, I put together a talk called "Windows 8: A Tale of Two Stacks" and covered dozens of features that have been added for both Windows 8 and Metro.




Read full article here

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

8 Quirks Windows 8 XAML Developers Should Understand Before Starting Their Metro App

It’s no secret, I love XAML. I write XAML, I talk about XAML, I dream in XAML. Sometimes that’s true – especially in the middle of a project. Sometimes people misconstrue that I don’t like HTML as a result, but as a father of three daughters, I can assure you picking favorites isn’t a requirement – even if I have a favorite. ;) But as a Metro developer, there are some things XAML developers should know that will save them serious time. I wish I had this list to start!

Look, this blog is not about complaining. There is no time for that. We need to get building. This is about saving XAML developers time by letting them know the deltas between their previous XAML development experience and what to expect in Metro. Metro XAML is new, right? Yeah - it’s still in beta as I write this. WPF is a decade old and SL is half that. They have a head start and Metro XAML is winding up. In the meantime, I let’s help each other save time. 

PS: remember when Silverlight was only JavaScript? Things enhance! Meanwhile it is what it is. Don’t waste cycles complaining. Build with what you have!

Read full article here 

30 More Questions About Windows 8 That I Get Asked All The Time

As a developer evangelist, I interact with a lot of developers. Many developers are just meeting Windows 8 for the very first time. Some developers have started to tinker. And, others are deep into their first application – on target for the store. The common thread between them are a set of recurring questions that I get over and over. I thought I would document a few of them.


Note: since Windows 8 has not been released some of these answers are subject to change. At time of writing (June 19, 2012) these answers are correct.

Read full article here

Creating tiled backgrounds in Metro style XAML apps

This class will let you tile an image in a Metro-style XAML app. Use an image that’s at least 128×128 for best memory efficiency

Textures can make your application beautiful. Here’s an example from http://subtlepatterns.com, which is full of classy textures:

Creating tiled backgrounds in Metro style XAML apps
A tileable (repeatable) texture image

These textures can make great backgrounds, but because the texture is usually smaller than your application (especially tiny textures like  ), you need to repeat (tile) the image vertically and horizontally. Images that “match up” on opposite sides are ideal. All the images on  http://subtlepatterns.comhttp://bgrepeat.com and http://www.repeatxy.com are tileable.

Read full article here

How to Make Your Grid Pan Automatically (HTML5/JS/CSS3 Metro Style APP)

I got a question at an event a few weeks ago that sounded at first like it was going to implicate a rather complicated answer. In the end, it turned out to be not so bad.
The question was…
On the start screen when the user moves his mouse to the edge, the tiles pan automatically. How do I make the grid in my app work just like that?
And the answer - or rather an answer is here…

var timer = null;
element.querySelector(".groupeditemslist").onmousemove = function (ev) {
    clearInterval(timer);
    timer = -1;
    if (ev.screenX > (document.body.scrollWidth - 50))
        timer = setInterval(function () { listView.scrollPosition += 30; }, 1);
    else if (ev.screenX < 50)
        timer = setInterval(function () { listView.scrollPosition -= 30; }, 1);
};

Read full article here

 

Monday 23 July 2012

Using the Metro Share Contract With Custom Data

Using the Metro Share Contract With Custom Data
In a few months Windows 8 will be released.  This is an exciting, reimagining of the Windows operating system.  With this new operating system comes a new application paradigm.  Metro applications are optimized for tablets device.  These new applications operate in a restrictive,  sandbox environment.  This is part of the security that is intended to keep user’s systems safe.  Windows developers are used to being able to access all parts of the system when developing their applications. So sharing data between applications is as easy as posting the data to a common location that both applications can access.  This could include a local database. This is not possible with Metro applications.

Read full article here

Using UDP sockets to connect a Windows 8 Metro style app to a .NET Micro Framework device: Part 2



The .NET Gadgeteer endpoint


Currently, you need Visual Studio 2010 to develop .NET Gadgeteer projects. If you have a Gadgeteer (or other .NET Micro Framework device) you probably already know that. So, set up a new .NET Gadgeteer Project named GadgeteerUdpDemo.

Module setup


As is typical, I've included the T35 display and the UsbClientDP modules in my circuit. The display is optional, but certainly helps for debugging or when you want to see the IP address on bootup. In addition, there's one MulticolorLed module and the ethernet module. The LED module is there to provide something for us to command, and the ethernet module is there to talk to the Windows 8 machine.

Using UDP sockets to connect a Windows 8 Metro style app to a .NET Micro Framework device

Read full article here

Serializing and deseralizing objects using XMLSerializer to StorageFile and LocalFolder using generics and async/await threading

This one was a hard one! I just couldn’t find ANY working examples of how to serialize and deserialize objects to local storage or local file. And it should be so simple, right? Well, here is an example app as always – enjoy :)

Serializing and deseralizing objects using XMLSerializer to StorageFile and LocalFolder using generics and async/await threading
Serializing and deseralizing objects to local storage/ local file using generics and async/await threading

Problem:
Your app has to work offline as well and you are looking for a way to store smaller amount of data. You would like to serialize objects to a the local storage in a local file.

Some requriements applicable from Application Profile Survey:
Networking: behaves well offline and while on intermittent internet connection…
Performance: rely on local data as much as possible…

The sample app can be downloaded here
Read full article here

Converting StorageFiles (png) to a Byte[] in order to display as an Image in WinRT (C#)

When you are building Metro Applications it will be very common that your application will have image (.png) files stored in local isolated storage and that you will want to show these images to the users inside your application.  In this post I am going to walk you though how to access these stored files and how to show them inside your XAML application.

Step 1: How to access the Storage File

var packageLocation = Windows.ApplicationModel.Package.Current.InstalledLocation;
var assetsFolder = await packageLocation.GetFolderAsync("Assets");
StorageFile myImage = await assetsFolder.GetFileAsync("myFile.png");
 
// We now have our StorageFile to work with
 
 
 
Read full article here
 
 

Metro, Direct2D and XAML – Burst of Performance in Windows 8

Now that Windows 8 Release Preview is out we are eager to explore the new framework and the features it offers. While part of it is the good old XAML, there are plenty of other unique features, one of them being the DirectX integration at XAML level. While XAML is a great technology and offers literally unlimited features regarding layout and UI richness, sometimes there are cases where we need to push the framework beyond its limits in order to achieve highly-performing components with responsive and fluid user interaction. Although in most cases writing efficient algorithms and using the proper data structures will be enough to achieve the desired performance, there are scenarios where extensive UI scenes are rendered frequently and the density of the updated pixels is high. So I was most excited by the opportunity to present Direct2D content directly in XAM and started a research on how it actually works and how the performance is affected.

WinRT is a brand new framework and there is little to no information over the Internet about Direct2D and XAML integration, so I decided to summarize my efforts and to hopefully help other people who are doing the same tests. In this post I will show you a simple C++ demo that uses Direct2D and a SurfaceImageSource instance to render a Polyline with 5000 points. Microsoft has done a great job with introducing three different entry points where DirectX content may be directly embedded in a XAML application. The demo also compares the same scenario implemented with a XAML Polyline shape.

Read full article here

Making money with your apps through the Windows Store

Currently, all the apps that are available in the Windows Store are free for customers to acquire—keeping with the preview nature of the Windows 8 releases to date. At Windows 8 RTM (Release To Manufacturing), all developers signing up for a company account and living in one of the supported countries will be able to publish and offer paid apps.

Making money with your apps through the Windows Store
 

How app pricing works


You, as the developer of the app, are always in control of the pricing of your app. When you onboard your app, you set its price (and the price of any in-app offers that your app provides) by selecting a price tier. Price tiers range from $1.49 to $999.99; you can see the entire list of price tiers on the Dev Center. The currency you pick for the price tier is based on the currency the Windows Store supports in the country you signed up from.

Read full article here

Windows 8 Metro app of Imagine Cup 2012

The world’s toughest problems will be addressed one solution at a time. In its 10th year, the Microsoft Imagine Cup brings together students from around the world who are stepping up to the challenge of leading global change. For Imagine Cup 2012, students selected from three competitions; Software Design, Game Design: Xbox/Windows, and Game Design: Phone, but these weren't their only opportunities to compete. They also had the opportunity to share their world-changing ideas in the Kinect Fun Labs Challenge, Windows Metro Style App Challenge, Windows Azure Challenge or Windows Phone Challenge. This application showcases the finalists for all eight competitions, highlighting their projects, the teams and even the students and where they're from.

Windows 8 Metro app of Imagine Cup 2012


Download from here

Creating a Zoomable ScrollViewer with ZoomSnapPoints in WinRT XAML

The Metro/WinRT XAML ScrollViewer by default allows to zoom in on its contents. That is because its ZoomMode property defaults to “Enabled”. I think in most cases it is actually not the desired behavior and you might want to set ZoomMode to ZoomMode.Disabled. I do understand though that this makes the feature more discoverable and does not hurt much while potentially getting users familiar with the new paradigm of quickly scrolling by zooming that is also displayed in the SemanticZoom control.

Read full article here

Metro Applications - FAQ

With the advent of Microsoft Windows 8, Windows Phone 8 and Office 2013, Microsoft is now all about Metro UI and Metro Apps. And when Windows 8 will be released, everybody will be developing or talking about Metro apps. But what is a Metro app and how to build these apps? There are many questions in the mind of many developers. Let’s just find answers for few of them in this blog post. 



Read full article here

Friday 20 July 2012

Why MetroOAuth or C# Async makes life easier

Why MetroOAuth or C# Async makes life easierYesterday, I finally pushed some of the OAuth libraries I have been tinkering with. I have a really nice and simple library (and this simplicity seems to flow throughout the library). I decided to pull out some examples using my DropboxClient to show how much simpler a library can be.

Here’s how you log in to Dropbox (in c#):

Read full article here

Win8, WinRT, Metro, Oh My

There has been a great deal of confusion about the differences between and Win8, WinRT, Metro, Oh Myamong WinRT, Windows 8, Metro, Metro Applications and etc.

[ Click on the image for full size ]

While there is no reason to be absolutist or pedantic about these differences, if we are going to communicate effectively we need to understand the fundamental differences. 

Thus, I offer the following simplifications to get us started…

Read full article here

Motown: Easy JavaScript Apps for Metro (Part 1)

Motown: Easy JavaScript Apps for Metro (Part 1)

The Web has arrived. Microsoft has made a bold move with Windows 8 that makes Web technology (HTML/CSS/JS) a first class citizen for building professional and commercial grade applications. Up until now, even with the advent of HTML 5 and incredibly fast JavaScript engines, Web applications have always seemed to have limitations compared to native development stacks for creating fully integrated and cutting edge user experiences. These days are over with the arrival of Windows 8 as Microsoft blends the Chakra JS engine and the hardware accelerated rendering / DOM environment of IE 10 with the new WinRT OS-level abstractions.
The WinJS libraries and bindings to WinRT provide a solid foundation for building applications but I feel that a significant gap remains. MS rightly, and I presume intentionally, left most of this gap open for the development community to fill. I created the Motown JavaScript library for Metro-style applications (HTML/CSS/JS) to fill the gap.

Read full article here

Thursday 19 July 2012

Poll: Is your company(or you) moving into #winRT development or are sticking with #silverlight & #WPF for now. #wpdev #win8dev

Poll: Is your company(or you) moving into #winRT development or are sticking with #silverlight & #WPF for now. #wpdev #win8dev

Submit your poll here

Windows 8 Developer Camp

Windows 8 Developer Camp

Event ID: 1032519813

Microsoft Waukesha Office
N19 W24133 Riverwood Drive Suite 150 Waukesha Wisconsin 53188 United States
Register by Phone: 1-877-MSEVENT (9AM-7PM EST M-F)
Meal: Yes
Language(s):  English.
Product(s):  Windows and Windows 8.
Audience(s):  Pro Dev/Programmer.

Read full article here

Intel: 20 Atom-based Windows 8 tablets in the pipeline, and 140 ultrabook designs

Intel's low-power Atom processor was once a netbook darling, but it appears that the computer industry will be banking on it once again to sell Windows 8 slates. Today, Intel CEO Paul Otellini announced that there are 20 Windows 8 tablets based on the "Clover Trail" Atom SOC during an investor call. In addition to discussing the $13.5 billion in revenue and $2.8 billion in profit the company raked in last quarter, the CEO also mentioned how popular the ultrabook has become with OEMs. Intel's now expecting 140 different Ivy Bridge ultrabook designs, up from the 110 designs the company confirmed in May, including 40 "touch-enabled" computers, and a dozen convertible machines. If those dozen convertibles count as tablets, too, it sounds like you'll have a definite choice between power and battery life when you purchase a Windows 8 slate. Curious what kinds of form factors you might see? Here's a look at some of the more exotic machines we saw this year at Computex Taipei.

Intel: 20 Atom-based Windows 8 tablets in the pipeline, and 140 ultrabook designs


Read full article here

Windows 8 will be available on…

…October 26th, 2012! That’s right! Just a few minutes ago, Steven Sinofsky announced at Microsoft’s annual sales meeting that customers will be able to get Windows 8 – whether in upgrade fashion or on a new PC – starting on October 26th. Earlier this month at the Microsoft Worldwide Partner Conference, Tami Reller told attendees Windows 8 would be available in October. But now everyone has a specific date to mark on their calendars. It’s on mine!

Windows 8 will be available on…


Read full article here

More info revealed on Windows 8 touch screen keyboard - Designing the Windows 8 touch keyboard

When we began planning how touch and new types of PCs might work on Windows 8, we recognized the need to provide an effective method for text entry on tablets and other touch screen PCs. Since Windows XP SP1, which had Tablet PC features built in, Windows has included a touchable on-screen keyboard. But those features were designed as extensions to the desktop experience. For Windows 8, we set out to improve on that model and introduce text input support that meets people’s needs, matches our design principles, and works well with the form factors we see today and expect to see in the future.

I’m writing this blog post on our Windows 8 touch keyboard using the standard QWERTY layout in English. As I look at it, the keyboard seems very simple and sort of obvious. This comes partly from having worked on it for a while, but also because keyboards are familiar to us. But there is more here than meets the eye (or, fingertips).

We started planning this feature area with no preconceived notions. As we do with all our features, we began the text input design project with a set of principles or goals. On a Windows 8 PC using touch, we want people to be able to:

  • Enter text quickly, reasonably close to the speed with which they type on a physical keyboard
  • Avoid errors, and be able to easily correct mistakes
  • Enter text comfortably, in terms of posture, interaction with the device, and social setting
More info revealed on Windows 8 touch screen keyboard - Designing the Windows 8 touch keyboard


Read full article here

Wednesday 18 July 2012

Information about the Developer License for Windows 8 Metro style apps

Writing Metro Style Apps for Windows 8 requires that you have a valid Developer License for Windows 8. The Developer License is free, regardless of the edition of Visual Studio you are using. The license works with Windows 8 Metro style apps only, you do not need it to write ASP.NET sites or WinForms programs. A developer license is not the same as a Windows Store account. A Windows Store account is what you use to sell and manage your Metro style apps.

Information about the Developer License for Windows 8 Metro style apps


Microsoft Windows Phone developers are accustomed to the notion of a developer license; however, other developers like ASP.NET or native Windows devs might not.

Read full article here

Exploring Win8 Metro: The RichEditBox & FilePickers

Win8 provides a number of controls in the XAML toolkit that are easy to use Exploring Win8 Metro: The RichEditBox & FilePickersand that provide a great deal of flexibility and power.  I’ll be writing about some of these controls now and then, starting with some simple and easy to use controls that do a lot of work for you.

The RichEdit box allows the user to open and view and edit a Rich Text document. Rich Text refers to all the text attributes you associate with a word processor but not with a text editor (e.g., bold, color, etc.). The RichEditBox control handles all the work of understanding and presenting the rich text.

Read full article here

What icon sizes are important for your WinRT app?

The are quite a couple of icons that you can set, though not all of them are absolutely required.  For the tile we have the following logo sizes. I also created the example of an app I’m working on. The main tile requires a logo of 150x150 pixels.

What icon sizes are important for your WinRT app?

Then we have a wide logo that’s only required when you want your app to be visible with a wide logo on the Start screen. When you use it, the size has 310x150 pixels. That’s two tile logo’s + a 10 pixel margin.

Read full article here

Tuesday 17 July 2012

OneNote “MX”, the new Windows 8 app, is now available in the Windows Store

We’ve been checking on and off all day, and just now we were able to find, and install, OneNote “MX Preview”, what might be officially the first “Windows 8 style app”, available from the Windows Store. The app lists as being available in English (United States), Japanese (Japan), and Spanish (Spain), but we’re not sure if it’s available anywhere but right here, at least for now.

Search on OneNote in the Windows Store on your Windows 8 device, log in with your Microsoft account, and download the app, and you’ll be connected with any OneNote notebooks you have stored in SkyDrive for that account, and find yourself in a very Metro-ish version of OneNote, complete with a surprise or two.

OneNote “MX”, the new Windows 8 app, is now available in the Windows Store


Read full article here

ReSharper 7 Adds Windows 8 Support, New Languages

JetBrains has announced the availability of ReSharper 7 Beta. In addition to support for Visual Studio 2012, this release includes tools for Windows 8 and WinRT development, additions to the Type Hierarchy, new refactorings, and improved support for several languages.

ReSharper 7 adds support for Visual Studio 2012 and the new Windows runtime for developers working with Metro-style applications in Windows 8. According to the JetBrains blog:

...The new version provides code inspections and quick-fixes that ease transition to the new environment, such as those highlighting WinRT types that should be sealed or those that can’t be generic; support for projected types and new types of resources in XAML, as well as type, naming, and method projection support for JavaScript.

In addition to the WinRT-related additions, ReSharper has improved support for JavaScript and jQuery, ASP.NET 4.5 and MVC 4, and SharePoint and LightSwitch projects. The SDK includes the ability to add other languages as well.

Read full article here

Learn how to develop Windows 8 apps in the UK

Last week I mentioned the free eBook Programming Windows 8 Apps, from Microsoft Press. Now if you are in the UK and are interested in learning how to develop for Windows 8 we have a number of Windows 8 devcamps  coming up in London:

The Windows 8 Camps have been designed to show you how to build a Windows 8 app. You can tailor the day to make it as personally productive and rewarding as possible. You can work on your own projects with assistance from Windows 8 experts, network with others and also have the option of attending short tutorial sessions on Windows 8 related topics. 
The Windows 8 Camps will cover an introductory overview session as well as a range of short tutorial sessions. Short tutorial sessions will include topics such as the basics of the OS and interaction with the OS, Metro style UX with examples in Store apps, The Store and the developer opportunity, the high level view of the platform – i.e. WinRT and the choice around implementation technology, and the tooling – the role of Visual Studio and Expression Blend


See details of how to book, agenda, prerequisites and other details at the links below…

Read full article here

Windows 8 Metro: Win as one with search and share contracts

As I said in the very first article of this series, one of the pillars of metro guidelines says :"win as one". When you write an application, you know that it has a specific domain where it is focused and works in the best way.

Windows 8 Metro: Win as one with search and share contracts


There are other things that are not specific to the domain and, also if they collaborate to the success, are better achieved by others. It is not a totally new concept, given that the operating system itself is an example of this way of thinking. As an example, when you need to open a file on the filesystem, you use an operating system's api to ask for a dialog that is completely managed by the operating system and it returns to you the choosed file.

Read full article here

Launching Windows Store from your Metro style app

Launching Windows Store from your Metro style app


Suppose you wanted to include a page in your new shiny Windows 8 Metro app listing your other apps and when a user taps on an app in the list he/she will be immediately transferred into Windows Store to give you more money (or at least boost your rankings). How do you do that?
In Windows Phone that was really easy. There was a MarketplaceDetailTask class just for that. So you would do something like this:

MarketplaceDetailTask mpTask = new MarketplaceDetailTask();
mpTask.ContentIdentifier = marketplaceAppId;
mpTask.Show();


Done!

But there’s nothing like that in WinRT. As it usually happens with advanced APIs simplicity was sacrificed in the name of flexibility. In Windows 8 any app can register (with user’s permission) as a default app to handle some protocol. So Windows Store is no different. It’s a default app to handle “ms-windows-store” protocol.

Read full article here
Web Informer Button