This project is read-only.

WP-About HowTo

It's always required to have some kind of 'About' page in Windows Phone application. But also it's boring like hell to create it all over again. This package simplifies the process to the bare minimum.

Sample

Info Tab Change Log Tab

Installation

 Install-Package codetitans-wp-about

As a result it will add into the project:
* a library reference
* AboutNavigator.cs file
* description resources (make sure their build action is 'Content')

Displaying the page

There are just 2 lines of code, that need to be added into the application, to make the AboutScreen appear.

First - in Windows Phone 7.x type of projects, there is a need to setup everything first (note: this step is not required for Windows Phone 8 applications).

public partial class App : Application
{
 ...
 public App()
 {
  ...
  AboutNavigator.Initialise();
 }
}

Secondly - somewhere inside the application - issue the navigation to the AboutScreen. It can be issued, by an application-bar-icon handler, or a regular button.

public partial class MainPage
{
 private void AboutButton_Click(object sender, EventArgs e)
 {
  AboutNavigator.Navigate(NavigationService);
 }
}

And that's ALL!

Customization

There are following extension points for customization of AboutScreen appearance and content:
* AboutNavigator::ConstructAboutPage() method
* About.xxx.txt files that were added automatically into application's resources (assets) folder

ConstructAboutPage() simply creates the view-model used by AboutScreen. It's actually build based on the contents of files from second step. And actually it allows to overwrite everything, directly in code.

They are loaded based on the following pattern: About.<type>.<language>.txt
Type can be: Info, ChangeLog, License, News.
Language however is simply a culture name, like: en-US, pl-PL or other. Providing a file without a language means, this is a neutral file for all app languages, where no translation is provided.

Example:
Project contains: About.Info.txt, About.Info.de-DE.txt, About.Info.pl-PL.txt
For English, Russian, Czech applications, it will display texts from About.Info.txt. For German application, it will use About.Info.de-DE.txt and for Polish app - About.Info.pl-PL.txt

Format of all of those files should be self explanatory. Enough to open attached "samples", when package got installed and input own data.

NOTE: Make sure About.xxx.txt files have a 'Build Action' set to 'Content'.

Last edited Nov 10, 2013 at 11:33 PM by FeydRauth, version 2

Comments

No comments yet.