Find Your Device:
Or Continue to Thread: [Guide][Beginners\Intermediate…
6th April 2013, 09:56 AM |#3  
sak-venom1997's Avatar
OP Senior Member
Flag Lucknow
Thanks Meter: 414
Donate to Me
Post Creating a project and choosing a template
When you create an app, the first thing you need to do is decide which language to use. You can choose JavaScript, Visual Basic, Visual C#, or Visual C++.

To create a project for a Windows Store app, click File > New Project (or press Ctrl+Shift+N).

You'll see the New Project dialog box.

Click one of the language nodes in the left pane. You'll see various app templates in the center pane. Some important templates, like Blank App, Grid App, and Split App, are shared between all four programming languages. A few templates are language-specific.When you create a project for a Windows Store app, Visual Studio creates a solution, which is a way of managing the various source elements of your project (code files, images, style sheets, settings, and so on). A solution container can contain multiple projects, and a project container typically contains multiple items that represent the references, folders, and files that you need to create your app.

Solution Explorer displays solutions, their projects, and the items in those projects. In Solution Explorer, you can open files for editing, add new files to a project, and view solution, project, and item properties. Here's what Solution Explorer looks like for a JavaScript project: courtesy MSDN

In addition to source code files appropriate to the language, each project also includes the package.appxmanifest file, which describes the app package for Windows. Each project also includes several image files, like splashscreen.png for the splash screen image and storelogo.png, which is used for Windows Store. A project source certificate (.pfx) file that's required for signing the package is also included in each project.

Designing a UI

When you plan your user interface, it's important to select the most appropriate Visual Studio project template for a starting point, and to learn about adding re-usable item templates such as Search contracts. You can develop your UI by writing code or by using a visual designer. A visual designer provides a designer-oriented interface for app design that includes a drag-and-drop interface for building the UI.

For Windows Store apps, you can use the visual designer provided in Blend for Microsoft Visual Studio 2012 for Windows 8. You can open a Visual Studio project in Blend by right-clicking the project in Solution Explorer and clicking Open in Blend. Alternatively, open the solution file (.sln) from within Blend.

image courtesy MSDN:

Updating the app manifest

unlike android working on mainfest of win 8 apps is a breeze

You can use the Manifest Designer in Visual Studio to edit the app manifest file that describes your app package. The app manifest file is present in Windows Store apps written in all languages.
The Manifest Designer has five tabs:

Application UI. Configure UI settings, including the logo, splash screen, and initial orientation.

Capabilities. Specify system features or devices that your app can use, such as Internet access, current location, and music library access.

Declarations. Add declarations for app contracts, like search and share target contracts, and specify their properties.

Content URIs. Specify URIs that your app either can or can't access. This tab appears only for JavaScript projects.

Packaging. Set properties that identify and describe your package when it is deployed.

To open the Manifest Designer, double-click the package.appxmanifest file in Solution Explorer, or right-click the file and click View Designer. The Capabilities tab of the Manifest Designer is shown here:

image courtesy MSDN:

Writing code

Visual Studio Express 2012 for Windows 8 includes full-featured editors for the following languages: JavaScript, HTML/XML/XAML, CSS, C#, Visual Basic, C++, HLSL. The editors provide many language-specific features that you can customize to help create your app:

IntelliSense, which provides features such as statement completion and parameter Help as you type code. This illustration shows a member list in the C# Code Editor. Note that the list also displays a Quick Info box for the selected item.

image courtesy MSDN:

Using inellisense:

Code snippet insertion, available by right-clicking in a code file and clicking Insert Snippet.

Navigation aids like Go To Definition, Bookmarks, and Navigate To.

The Go To Definition command enables you to find the definition of a class or function by right-clicking the identifier and clicking Go To Definition. (Visual Basic and Visual C++ use the Object Browser to display information about Windows Runtime types.)
This illustration shows options like Go To Definition and Insert Snippet in the JavaScript Code Editor:

You can customize the behavior of the Code Editors, and enable or disable features like indentation, word wrap, and statement completion. To customize the behavior of the Code Editors, click Tools > Options, expand Text Editor, expand the appropriate Code Editor to configure, and then select the appropriate category of options.

Building an app

To build an app, click Build Solution (or press F7) or Rebuild Solution (or press Ctrl+Alt+F7) on the Build menu. You'll see the results of the build process in the Output window.


Read The MSDN article
Last edited by sak-venom1997; 9th April 2013 at 01:17 PM.
The Following User Says Thank You to sak-venom1997 For This Useful Post: [ View ]