I follow these steps
This app requires references to the assemblies containing the sensor APIs and the XNA Framework because accelerometer data is passed in the form of an XNA Framework Vector3 object. From the Project menu, click Add Reference…, select Microsoft.Devices.Sensors and Microsoft.Xna.Framework, and then click OK.
But why this error is coming Accelerometers is 'namespace' but is used like a 'type'
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;
using Microsoft.Devices.Sensors;
using Microsoft.Xna.Framework;
namespace Accelerometer
{
public partial class MainPage : PhoneApplicationPage
{
// Constructor
Accelerometer accelerometer;
public MainPage()
{
InitializeComponent();
if (!Accelerometer.IsSupported)
{
// The device on which the application is running does not support
// the accelerometer sensor. Alert the user and disable the
// Start and Stop buttons.
statusTextBlock.Text = "device does not support accelerometer";
startButton.IsEnabled = false;
stopButton.IsEnabled = false;
}
}