void MainPage_Loaded(object sender, RoutedEventArgs e)
        {
            try
            {
                indicator = new ProgressIndicator
                {
                    IsVisible = true,
                    IsIndeterminate = true
                };
                SystemTray.SetProgressIndicator(this, indicator);
                CameraButtons.ShutterKeyPressed += CameraButtons_ShutterKeyPressed;
                LoadShooter(CameraType.FrontFacing);

                var wc = new WebClient();
                wc.DownloadStringCompleted += DownloadStringCompleted;
                var searchUri = string.Format(
                  "http://gdata.youtube.com/feeds/api/videos?q={0}&format=6",
                  HttpUtility.UrlEncode("harlem shake"));
                wc.DownloadStringAsync(new Uri(searchUri));
                shake = ShakeGesturesHelper.Instance;
                shake.ShakeGesture += shake_ShakeGesture;
                RootLayout.SelectionChanged += RootLayout_SelectionChanged;
            }
            catch (Exception ex)
            {
            }
        }
 public DarumaShakeView()
 {
     InitializeComponent();
     _viewModel = new DarumaShakeViewModel(IoCContainter.Get<IDarumaApplicationService>(), IoCContainter.Get<IFavoritApplicationService>());
     DataContext = _viewModel;
     _shake = ShakeGesturesHelper.Instance;
     _shake.MinimumRequiredMovesForShake = 3;
     _shake.MinimumShakeVectorsNeededForShake = 20;
     _shake.StillMagnitudeWithoutGravitationThreshold = 1;
     _shake.ShakeGesture += OnShakeOnShakeGesture;
     _shake.Active = true;
 }