giovedì 22 agosto 2013

Windows Store Apps Succinctly - Free eBook

Some days ago I started to develop an application for Windows Store.
I love to develop in C#, and after some pages in MSDN documentation, I searched for an offline free e-book to read with my tablet.
I found a great resource from Syncfusion:

Windows Store Apps Succinctly

This book is written by John Garland and you can download 185 pages in PDF or Kindle format.

Before starting, please remember: if you are a beginner in development, this ebook is not for you.

Why is it a good choice? Because it's simple and fast to read. It starts from core concepts until you get to the deployment. Then at the end of this book, you are ready to fully develop your first application.

Main Chapters
  1. Core Concepts: the introduction to Windows Store apps, WinRT and the Windows Runtime with a simple "Hello World" sample.
  2. XAML, Controls, and Pages: all you need to know about XAML, from Namespace declarations, to Animations and Data Binding. The chapter shows all essential controls for the user interface and explains how to work with Pages and Frames.
  3. Application Life Cycle and Storage: one of the most important chapters. The Windows Store apps life cycle is not the same as the desktop apps, then you need to understand all steps for the the best user experience. This chapter continues with Data Storage. It explains how to work with Application Data (local, roaming, temporary), User Data (file and folder picker) and Data Storage (files/folder and some useful links to LiveConnect and SQLite). 
  4. Contracts and Extensions: the Windows 8 Charms: search, share, print, app settings, etc.. The chapter ends with handling file types and protocols.
  5. Tiles, Toast, and Notifications: yes..the big feature of Windows Phone, now in Windows 8. If you want to release a great app, you really need a good Live Tile. This chapter covers all types of Tiles and how to schedule the updates. Then it talks about the Toast Notifications and ends with a sample of Push Notification.
  6. Hardware and Sensors: an overview of all sensors (like compass, gyroscope, accelerometer and gps) and how to interact with Camera. The user love those features, then use them in your app.
  7. Deployment: your application is done, let's publish it on Windows Store! Understand the Store prices and accounts; learn how to use the Windows Application Certification Kit; add the trial mode and the In-app purchase; configure the PubCenter and the Ads.

  • Free! :)
  • Easy and fast to read
  • XAML + C#
  • All development cycle
  • A lot of samples and tips
  • Kindle format
  • Not for development beginners

  • No NFC samples
  • No gestures samples

Now enjoy your reading... thanks Syncfusion.

FYI another good free resource is Metro Studio: a customizable collection of icon templates.

mercoledì 21 agosto 2013

Restore NuGet Packages

To restore NuGet packages you need only few steps:

1- In Visual Studio Options --> Package Manager -> Check "Allow NuGet to download missing packages during build".

2- In the Solution --> Enable NuGet Package Restore.

3- Build your project.

That's all!

giovedì 15 agosto 2013

String format in Xaml

When you need to concatenate some strings in a TextBlock you can use the tag like Run.

Silverlight 4 has introduced an useful feature to make this more easy: StringFormat.
Now you can put more informations in a single element.

The code is very simple:
<TextBlock Text="{Binding Username, StringFormat='Hello \{0\}'}" />
<TextBlock Text="{Binding Temperature, StringFormat=\{0\}°}" />

and it works also with numbers and dates:
<TextBlock Text="{Binding Value, StringFormat=\{0:n2\}}" />
<TextBlock Text="{Binding Value, StringFormat=\{0:c2\}}" />
<TextBlock Text="{Binding Date, StringFormat=f}" />

You can check more details in the Kunal's blog