本文整理汇总了C#中System.Windows.Input.GestureEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# System.Windows.Input.GestureEventArgs类的具体用法?C# System.Windows.Input.GestureEventArgs怎么用?C# System.Windows.Input.GestureEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
System.Windows.Input.GestureEventArgs类属于命名空间,在下文中一共展示了System.Windows.Input.GestureEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: WishButton_OnTap
private async void WishButton_OnTap(object sender, GestureEventArgs e)
{
WishButton.IsEnabled = false;
var wish = WishTextBox.Text;
DarumaWishTheme theme;
Enum.TryParse(WishThemePicker.SelectedItem.ToString(), out theme);
if (string.IsNullOrEmpty(wish)
|| !Enum.IsDefined(typeof(DarumaWishTheme), theme)
|| theme == DarumaWishTheme.NoSet)
{
MessageBox.Show(AppResources.EmptyWishTextBox);
WishButton.IsEnabled = true;
WishTextBox.Focus();
return;
}
await _viewModel.CreateDaruma(wish, theme);
NavigationService.Navigate(new Uri(ViewUrlRouter.MainViewUrl, UriKind.Relative));
}
示例2: OnDeleteTap
private void OnDeleteTap(object sender, GestureEventArgs e)
{
var item = (DownloadItemDataModel) _focusedItem.DataContext;
item.Cancel();
ViewModel.Remove(item);
ViewModel.DownloadsContainer.Remove(item);
}
示例3: UIElement_OnTap
private void UIElement_OnTap(object sender, GestureEventArgs e)
{
IsHidden = false;
AnimationHide.Begin();
AnimationHide.Completed += (o, args) => PopupManager.Instance.Hide();
}
示例4: OnHold
protected override void OnHold(GestureEventArgs e)
{
HandleTapAndHold(e, true);
if (!e.Handled)
base.OnHold(e);
}
示例5: GoToStory
private void GoToStory(object sender, GestureEventArgs gestureEventArgs)
{
var rssItem = (sender as StackPanel).DataContext as RssStory;
var wbt = new WebBrowserTask();
wbt.Uri = rssItem.StoryLink;
wbt.Show();
}
示例6: Messages_OnTap
private void Messages_OnTap(object sender, GestureEventArgs e)
{
var shareStatusTask = new SmsComposeTask
{
Body = _infoSharing.Quote
};
shareStatusTask.Show();
}
示例7: SocialNetwork_OnTap
private void SocialNetwork_OnTap(object sender, GestureEventArgs e)
{
var shareStatusTask = new ShareStatusTask
{
Status = _infoSharing.Quote
};
shareStatusTask.Show();
}
示例8: AlternativeName
public void AlternativeName(object sender, GestureEventArgs gestureEventArgs)
{
var swtStore = (SimpleWebTokenStore)Application.Current.Resources["swtStore"];
var name = tbUsername.Text;
var nameIdentifier = swtStore.SimpleWebToken.NameIdentifier;
RetrieveOrCreatePlayer(name, nameIdentifier);
}
示例9: IssueListBox_Tap
private void IssueListBox_Tap(object sender, GestureEventArgs e)
{
var issue = IssueListBox.SelectedItem as Issue;
if (issue != null)
{
var frame = App.Current.RootVisual as PhoneApplicationFrame;
frame.Navigate(new Uri("/Contexts/Review/Mvvm/IssueReviewPivotPage.xaml?key=" + issue.Key, UriKind.Relative));
}
}
示例10: POnDoubleTap
private void POnDoubleTap(object sender, GestureEventArgs gestureEventArgs)
{
var p = sender as Pushpin;
if (p == null) return;
var rv = p.Content as ReturnVisitData;
if (rv == null) return;
NavigationService.Navigate(new Uri(string.Format("/View/EditReturnVisit.xaml?id={0}", rv.ItemId.ToString(CultureInfo.InvariantCulture)), UriKind.Relative));
}
示例11: Play
public void Play(object sender, GestureEventArgs gestureEventArgs)
{
var cup = ((CupControl)sender).DataContext as CupVM;
var currentGameState = Game.State;
if (!Game.Play(cup))
return;
SystemTray.ProgressIndicator.IsVisible = true;
Context.UpdateGame(Player.Name, Game.ToGame(), game =>
Dispatcher.BeginInvoke(() =>
{
SystemTray.ProgressIndicator.IsVisible = false;
switch (Game.State)
{
case GameState.Finished:
var winner = Game.Winner;
var score = Game.Score(winner).Stones;
if (winner == Player)
{
MessageBox.Show("Congratulations, you won! You have earned " + score + " points.");
Context.ScorePlayer(winner.Name, score, player =>
Dispatcher.BeginInvoke(NavigationService.GoBack)
, () => { });
}
else
{
MessageBox.Show("Sorry, you lost.");
Context.ScorePlayer(winner.Name, score, player =>
Dispatcher.BeginInvoke(NavigationService.GoBack)
, () => { });
}
break;
case GameState.Client:
if (currentGameState != GameState.Client)
_nsc.NotifyAsync(Player.Name, Game.Client.Name, Game.Id);
else
CupControl.AnimationDelayIndex = 0;
break;
case GameState.Host:
if (currentGameState != GameState.Host)
_nsc.NotifyAsync(Player.Name, Game.Host.Name, Game.Id);
else
CupControl.AnimationDelayIndex = 0;
break;
}
}), () =>
Dispatcher.BeginInvoke(() =>
{
SystemTray.ProgressIndicator.IsVisible = false;
MessageBox.Show("Failed to register play. Try again.");
})
);
}
示例12: WishDaruma_OnTap
private void WishDaruma_OnTap(object sender, GestureEventArgs e)
{
if (WishStack.Visibility == Visibility.Visible)
{
WishStack.Visibility = Visibility.Collapsed;
NewDarumaImg.Source = new BitmapImage(new Uri(ImageUrlRouter.NewDaurmaImageUrl, UriKind.Relative));
}
else
{
WishStack.Visibility = Visibility.Visible;
NewDarumaImg.Source = new BitmapImage(new Uri(ImageUrlRouter.WishedDaurmaImageUrl, UriKind.Relative));
}
}
示例13: HubTile_OnTap
private void HubTile_OnTap(object sender, GestureEventArgs e)
{
var hub = (HubTile)sender;
if (_flippedTiles.Contains(hub))
{
_flippedTiles.Remove(hub);
VisualStateManager.GoToState(hub, "Expanded", true);
}
else
{
_flippedTiles.Add(hub);
VisualStateManager.GoToState(hub, "Flipped", true);
}
}
示例14: ImgPhone_OnTap
private void ImgPhone_OnTap(object sender, GestureEventArgs e)
{
var selectedFilmCenter = ((FrameworkElement)(sender)).DataContext as FilmCenter;
if (null != selectedFilmCenter)
{
var phoneCallTask = new PhoneCallTask
{
PhoneNumber = selectedFilmCenter.Phone,
DisplayName = selectedFilmCenter.DisplayName
};
phoneCallTask.Show();
}
}
示例15: Upload_Button_Click
private void Upload_Button_Click (object sender, GestureEventArgs e)
{
if (null == _progressIndicatror || !_progressIndicatror.IsVisible)
{
if (null != _recordingListBox.SelectedItem)
{
var recording = _recordingListBox.SelectedItem as Recording;
if (null == Utilities.SkyDriveSession)
NavigationService.GoBack ();
else
UploadFile (recording.Name);
}
}
}