Наследование: GalaSoft.MvvmLight.Messaging.MessageBase
		void listbox_ManipulationStateChanged(object sender, EventArgs e)
		{
			if (ManipulationState == System.Windows.Controls.Primitives.ManipulationState.Idle)
			{
				isMoving = false;
				viewportChanged = false;
			}
			else if (ManipulationState == System.Windows.Controls.Primitives.ManipulationState.Manipulating)
			{
				viewportChanged = false;
				DoInterimManipulation();
			}
			else if (ManipulationState == System.Windows.Controls.Primitives.ManipulationState.Animating)
			{
				if (PulledDown)
				{
					// User released, do refresh
					var redditVM = DataContext as RedditViewModel;
					var message = new RefreshSubredditMessage();
					if (redditVM != null)
					{
						message.Subreddit = redditVM.SelectedSubreddit;
						Messenger.Default.Send<RefreshSubredditMessage>(message);
					}
					Compression(this, new CompressionEventArgs(CompressionType.None));
				}
			}
		}
Пример #2
0
 private void RefreshButton_Tap(object sender, System.Windows.Input.GestureEventArgs e)
 {
     var viewModel = DataContext as RedditViewModel;
     if (viewModel != null)
     {
         var message = new RefreshSubredditMessage();
         message.Subreddit = viewModel.SelectedSubreddit;
         Messenger.Default.Send<RefreshSubredditMessage>(message);
     }
 }
Пример #3
0
		private async void OnSubredditRefreshed(RefreshSubredditMessage message)
		{
            if (this.SelectedSubreddit == message.Subreddit)
            {
                RefreshLinks();
            }
		}