Posted in WIN_8

Windows 8 Metro app

Windows 8 Metro App Development

Requirements:

  • Windows 8 Developer Preview OS
  • Visual Studio 2012 Express

 

Advertisements
Posted in WIN_7

Windows Phone 7 Introduction with Hello world Example

Introduction:

In this chapter we are going to see how to create a silverlight Windows Phone 7 Application using Visual Studio2010.Here in this chapter we will create a Hello World Application and try to run it in Windows Phone 7 Emulator to check the working mode of the application. Let us see the steps involved in designing the Hello World application using the visual studio 2010 IDE.

Steps:

1.Start visual studio 2010 IDE.

2.Select new project

Newp

3.Select silverlight windows phone project

na

4.Provide a name for the project as shown in the screen above.

5.Clicking on ok will create the application.

Now drag and drop controls from the toolbox to get some user input and show the output Hello World.

Click and drag the textblock and change the Text name as Hello World in the properties menu.

c1

Now execute the project.Check the output by pressing F5 in the keyboard directly or by pressing the play button from the Visual studio IDE tool bar and we can see the output in the windows Phone 7 Emulator as shown in the screen below.

Output

Posted in WIN_7

windows phone 7 Storage

Windows Phone 7 Isolated storage step by step Tutorial

Steps 

1.Create  two button ,one textbox and one textblock.

iso1

2.Insert the namespace given below

using System.IO;

using System.IO.IsolatedStorage;

iso2

3.In code behind page write the code given below

namespace TextStorage
{
    public partial class MainPage : PhoneApplicationPage
    {
        // Constructor
        public MainPage()
        {
            InitializeComponent();
        }
      private void button1_Click(object sender, RoutedEventArgs e)
        {
            IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForApplication();
            isf.CreateDirectory("DATA");
            StreamWriter sw = new StreamWriter(new IsolatedStorageFileStream("DATA\\suresh.txt", FileMode.Create, isf));
            sw.WriteLine(textBox1.Text);
            sw.Close();
        }
       private void button2_Click(object sender, RoutedEventArgs e)
        {
            IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForApplication();
            StreamReader sr = null;
            try
            {
              sr = new StreamReader(new IsolatedStorageFileStream("DATA\\suresh.txt", FileMode.Open, isf));  
              textBlock1.Text = sr.ReadLine();                 
             sr.Close();
            }
            catch
            {
                textBlock1.Text = "Error reading file";
            }   }
    } }

4.Now run your application.