Introduction to WP

Windows Phone App development is getting popularity day by day. It’s a Microsoft technology that is a gift for the .NET developer. We .NET developers are very lucky that we are not only limited to we development only. Microsoft has given us the power to create any kind of Application weather it is desktop , Web or mobile.

Windows phone code writing is similar to WPF code writing. In WPF we use XAML to Design UI and same here in windows Phone Development. Following are the technology used in Windows phone App development:

  1. UI defined using XAML
  2. Logic written using C# or VB language
  3. Access .NET APIs , Windows Phone Runtime APIs other API also
  4. SQL lite Database is used for the local system storage
  5. Telerik controls

Windows Phone 8 requirements

Below are the requirements that required if you are going to create WP App:

  1. OS(operating systems) Support: Windows 8: Windows 8
  2. Hardware: 4 GB of free hard disk space, 4 GB RAM, 64-bit (x64) CPU
  3. Emulator Support: Windows 8 Pro edition Emulator or greater
  4. IDE visual studio 10,12,13

What’s in an App Package

AppManifest file contains all information required to deploy the application

WM appManifest enable all the device capability and requirement specification.

app1

App Manifest and Capabilities

  1. Explicitly declares application integration endpoints
  2. File capabilities (music/pictures/videos/documents libraries, removable storage)
  3. Devices capability(webcam, microphone, SMS etc);
  4. Extensible to new device classes – user consent involved
  5. Network and identity (internet, private network, credentials)
  6. File type associations
  7. App contracts (search)
  8. Defines app branding and logos

Common Structure

Properties

  • AppMainfest
  • WMAppMainfest
  1. Assets
  2. Resources
  3. App.xaml
  4. App.Xaml.cs
  5. MainPage.XAML

app2

Properties: It contains Appmainfest and WMAppMainfest file to deploy application.

Assets: Images are placed inside Assets Folder.

Resources: it contains all the resource file that needs to run application.

App.xaml & App.xaml.cs

  1. Handle all Incoming Request
  2. End Application Request
  3. Global declaration
  4. App.xaml is for common namespaces
  5. We can Declare our Global variable in App.xaml.cs class

App Methods

Following are the methods that is used by default in App class. We will discuss later about these methods in our next blog.

  1. App()
  2. Application_Launching(object sender, LaunchingEventArgs e)
  3. Application_Activated(object sender, ActivatedEventArgs e)
  4. Application_Deactivated(object sender, DeactivatedEventArgs e)
  5. Application_Closing(object sender, ClosingEventArgs e)
  6. RootFrame_NavigationFailed(object sender, NavigationFailedEventArgs e)
  7. Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)

Splash Screen

It is Just a Image with name Splash.It will run first when App start.First time when your application runs, it will ask you for the image and image is only the splash image. Image name is fixed i.e “splash“.

  1. Open VS and select Visual C# then select Windows Phone. Press Ok and it will create some default folder. app3
  2. Open Solution Explorer and you will find the default structure of App. app4
  3. Open mainpage.xaml and write XAML code to design your UI as mention in below Image. app5
  4. VS provide you the facility to check how your UI is going to display after run. So you can check your design simultaneously. From Top toolbar menu Select the Emulator option and click on Debug green icon.app6
  5. After successful debug an Emulator will popup and you can check your App, how it looks like and wok.app7

So, we are done with our first App. We have create our one simple Application just in Five steps.