Search This Blog

Showing posts with label Windows phone 7. Show all posts
Showing posts with label Windows phone 7. Show all posts

Monday, March 12, 2012

Unlock Windows Phone 7 Emulator through coding, Start all application in windows phone emulator 7 which is not displayed by default


1. start visual studio 2010
2. create a new console application.
3. add reference to “Microsoft.Smartdevice.Connectivity” which is found in the path
“c:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.SmartDevice.Connectivity\v4.0_10.0.0.0__b03f5f7f11d50a3a\Microsoft.Smartdevice.Connectivity.dll”
// -----  Select this path according to your system.
Note : Please keep in mind for this sample to work you should have windows phone sdk installed on your pc.

Paste this code in  Program.cs which is created by default in your project.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.SmartDevice.Connectivity;
using System.Globalization;


Thursday, January 19, 2012

Working with Pushpins in the Map Control


To add a basic pushpin, create the pushpin object and add it as a child to the map. The following example allows the user to push a button that adds a pushpin to the center of the current map view.
<phone:PhoneApplicationPage 
    x:Class="WindowsPhoneApplication1.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="768"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    shell:SystemTray.IsVisible="True" xmlns:my="clr-namespace:Microsoft.Phone.Controls.Maps;assembly=Microsoft.Phone.Controls.Maps">

    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
            <TextBlock x:Name="ApplicationTitle" Text="MY APPLICATION" Style="{StaticResource PhoneTextNormalStyle}"/>
            <TextBlock x:Name="PageTitle" Text="page name" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
        </StackPanel>

        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
            <my:Map Height="427" HorizontalAlignment="Left" Margin="12,6,0,0" Name="map1" VerticalAlignment="Top" Width="438" />            
            <Button Content="Add Center Pushpin" Height="72" HorizontalAlignment="Left" Margin="90,467,0,0" Name="button1" VerticalAlignment="Top" Width="297" Click="button1_Click" />
        </Grid>
    </Grid>

</phone:PhoneApplicationPage>

Use the Bing Maps Silverlight Control for Windows Phone(Source MSDN)

  1. Make sure you have downloaded and installed the Windows Phone SDK from the App Hub.
  2. Launch Visual Studio 2010 Express for Windows Phone from the Windows Start menu.
  3. Create a new project by clicking the File | New Project menu command.
  4. The New Project window will be displayed. Expand the Visual C# templates, and then select the Silverlight for Windows Phone templates.
  5. Select the Windows Phone Application template. Fill in the project Name as desired.
  6. Click OK. A new project will be created and MainPage.xaml will be opened in the Visual Studio designer window.
The next step is to lay out the controls of the application using the Visual Studio designer. After adding the controls, the final layout will look similar to the following screenshot:
MapLayout

To add the controls of the application


Sunday, January 8, 2012

About Windows Phone 7

Windows Phone 7 Terminology


  • Accelerometer. A device capability that measures acceleration in three planes, and the direction of the force of gravity that indicates the attitude of the device. Can be used to detect movement, including gestures such as shaking the device.
  • Advanced Encryption Standard (AES). A symmetric encryption algorithm available on Windows Phone 7 that can be used to encrypt data.

Featured Posts

Unlock Hidden Windows Startup and Shutdown Details : How to Enable Verbose Startup and Shutdown Messages in Windows 11

WINDOWS TROUBLESHOOTING · FULL GUIDE Unlock Hidden Windows Startup and Shutdown Details Enable Verbose Status...