• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Input.TappedRoutedEventArgs类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Windows.UI.Xaml.Input.TappedRoutedEventArgs的典型用法代码示例。如果您正苦于以下问题:C# TappedRoutedEventArgs类的具体用法?C# TappedRoutedEventArgs怎么用?C# TappedRoutedEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



TappedRoutedEventArgs类属于Windows.UI.Xaml.Input命名空间,在下文中一共展示了TappedRoutedEventArgs类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: PostCommentButton_Tapped

 private async void PostCommentButton_Tapped(object sender, TappedRoutedEventArgs e)
 {
     string body;
     CommentTextBox.Document.GetText(Windows.UI.Text.TextGetOptions.None, out body);
     if (!AuthenticationService.IsLogin)
     {
         MessageDialog messageDialog = new MessageDialog("请先登录");
         await messageDialog.ShowAsync();
         AuthenticationService.RedictLoginPage();
         return;
     }
     PostNewsComment postNewsComment = new PostNewsComment();
     postNewsComment.ContentId = this.NewsCommentViewModel.News.Id;
     postNewsComment.Content = body;
     postNewsComment.StrComment = "";
     postNewsComment.ParentCommentId = this.NewsCommentViewModel.News.Id;
     postNewsComment.Title = this.NewsCommentViewModel.News.Title;
     PostResult postBlogCommentResponse = await NewsService.PostCommentAsync(postNewsComment);
     if (!postBlogCommentResponse.IsSuccess)
     {
         MessageDialog messageDialog = new MessageDialog(postBlogCommentResponse.Message);
         await messageDialog.ShowAsync();
         //其他异常则不处理
         if (postBlogCommentResponse.Message.Contains("登录"))
         {
             AuthenticationService.RedictLoginPage();
         }
         return;
     }
     else
     {
         this.NewsCommentViewModel.Refresh();
     }
 }
开发者ID:GuojieLin,项目名称:CnBlogs,代码行数:34,代码来源:NewsCommentListPage.xaml.cs


示例2: DrawerIcon_Tapped

 private void DrawerIcon_Tapped(object sender, TappedRoutedEventArgs e)
 {
     if (DrawerLayout.IsDrawerOpen)
         DrawerLayout.CloseDrawer();
     else
         DrawerLayout.OpenDrawer();
 }
开发者ID:AkshayGupta94,项目名称:ProjectAukatFinal,代码行数:7,代码来源:Feedback.xaml.cs


示例3: TextBlock_Tapped_1

 private void TextBlock_Tapped_1(object sender, TappedRoutedEventArgs e)
 {
     if (this.Frame != null)
     {
         this.Frame.Navigate(typeof(BasicPage1));
     }
 }
开发者ID:ebajaruns,项目名称:Edgarsss,代码行数:7,代码来源:WinCodeCampEvaluationGrid.xaml.cs


示例4: Button_Tapped_1

        private async void Button_Tapped_1(object sender, TappedRoutedEventArgs e)
        {

            bool cleared = false;
            MessageDialog mBox = new MessageDialog("Selecting yes will clear all the air quality data stored by the app.", "Clear User Data");
            var cmd = new UICommandInvokedHandler((command) =>
            {
                var temp = command.Label;
            });

            mBox.Commands.Add(new UICommand(
                      "Yes", cmd));
            mBox.Commands.Add(new UICommand(
                                  "No", cmd));

            var returnCmd = await mBox.ShowAsync();

            if (String.Equals(returnCmd.Label, "Yes"))
                cleared = await airDB.clear();
            else
                return;

            if (cleared)
            {
                MessageDialog mBox2 = new MessageDialog("User Data Cleared", "User Data");
                mBox2.ShowAsync();
            }
            else
            {
                MessageDialog mBox2 = new MessageDialog("Failed to Clear User Data (there may be none to clear)", "User Data");
                mBox2.ShowAsync();
            }
        }
开发者ID:rssktt,项目名称:FairAir,代码行数:33,代码来源:SettingsPage.xaml.cs


示例5: ShowSummaryButton_OnTapped

 private async void ShowSummaryButton_OnTapped(object sender, TappedRoutedEventArgs e)
 {
     var ctrl = new VoteSummaryCtrl();
     ctrl.DataContext = _viewModel.VoteSet;
     SummaryBorder.Child = ctrl;
     SummaryGrid.Visibility = Visibility.Visible;
 }
开发者ID:jayway,项目名称:Kelly-Win8-XAML,代码行数:7,代码来源:MainPage.xaml.cs


示例6: mediaMain_Tapped_1

 private void mediaMain_Tapped_1(object sender, TappedRoutedEventArgs e)
 {
     if (mediaMain.CurrentState == MediaElementState.Playing)
         mediaMain.Pause();
     else
         mediaMain.Play();
 }
开发者ID:modulexcite,项目名称:windows8,代码行数:7,代码来源:VideoPage.xaml.cs


示例7: calloutButton_Tapped

 void calloutButton_Tapped(object sender, TappedRoutedEventArgs e)
 {
     try
     {
         if (calloutButton != null)
         {
             object parent = VisualTreeHelper.GetParent(calloutButton);
             while (!(parent is Page || parent is FlatNavigationPage))
                 if (parent != null)
                     parent = VisualTreeHelper.GetParent(parent as DependencyObject);
                 else break;
             if (parent != null)
             {
                 Page page = parent as Page;
                 if (page != null)
                 {
                     if (page.TopAppBar != null)
                     {
                         page.TopAppBar.IsOpen = true;
                     }
                     if (page.BottomAppBar != null)
                     {
                         page.BottomAppBar.IsOpen = true;
                     }
                 }
             }
         }
     }
     catch (Exception)
     {
     }
 }
开发者ID:CuiXiaoDao,项目名称:cnblogs-UAP,代码行数:32,代码来源:AppCommandsCalloutButton.cs


示例8: MenuAjustes_Tapped

 private void MenuAjustes_Tapped(object sender, TappedRoutedEventArgs e)
 {
     var ajuste = sender as StackPanel;
     string s = Paginas.FirstOrDefault(c => c.Titulo.Equals(ajuste.Name.Substring(4))).ClassType;
     var t = Type.GetType(s);
     ScenarioFrame.Navigate(t);
 }
开发者ID:carloshenriquecarniatto,项目名称:Podcasts,代码行数:7,代码来源:MainPage.xaml.cs


示例9: Win8_CodeCamp_Tapped

 private void Win8_CodeCamp_Tapped(object sender, TappedRoutedEventArgs e)
 {
     if (this.Frame != null)
     {
         this.Frame.Navigate(typeof(CodeCamp));
     }
 }
开发者ID:ebajaruns,项目名称:Edgarsss,代码行数:7,代码来源:ITRatingGrid.xaml.cs


示例10: flipView_Tapped

        private async void flipView_Tapped(object sender, TappedRoutedEventArgs e)
        {
            try
            {
                // try to cast source as content presenter
                var content = e.OriginalSource as ContentPresenter;

                if (content == null) return;

                // Send data to Event Hub
                var eventData = new Event
                {
                    Id = "iotboothdevice",
                    Timecreated = DateTime.UtcNow.ToString("mm:dd:yyyy hh:mm"),
                    Value = content.Content.ToString()
                };

                var result = await _connectionManager.SendEvent(eventData); // send message over event hub
                if (!result) return;
                var message = string.Format("Last Successful Message sent at: {0}", DateTime.UtcNow);

                textBlock.Text = message;
                //var dialog = new MessageDialog("Thanks for visiting the IoT booth!");
                //await dialog.ShowAsync();
                InitializeFlipView();
            }
            catch (Exception ex)
            {
                textBlock.Text = ex.Message;
            }
        }
开发者ID:niksacmsft,项目名称:IoT.Samples.Universal.EventIngest,代码行数:31,代码来源:MainPage.xaml.cs


示例11: backButton_Tapped

 private void backButton_Tapped(object sender, TappedRoutedEventArgs e)
 {
     var fr = new Frame();
     fr.Navigate(typeof(MainPage));
     Window.Current.Content = fr;
     Window.Current.Activate();
 }
开发者ID:kfwls,项目名称:ftdCruncher,代码行数:7,代码来源:ComparePage.xaml.cs


示例12: Todo_Tapped

        /* Items tab */

        private void Todo_Tapped(object sender, TappedRoutedEventArgs e)
        {
            var todo = (TodoItem)((FrameworkElement)sender).Tag;

            this.todoDetails = new TodoDetailsViewModel(todo);
            this.DataContext = this.todoDetails;
        }
开发者ID:avisprince,项目名称:UniversalTodoApp,代码行数:9,代码来源:TodoDetails.xaml.cs


示例13: PostCommentButton_Tapped

 private async void PostCommentButton_Tapped(object sender, TappedRoutedEventArgs e)
 {
     string body;
     CommentTextBox.Document.GetText(Windows.UI.Text.TextGetOptions.None, out body);
     if (!AuthenticationService.IsLogin)
     {
         MessageDialog messageDialog = new MessageDialog("请先登录");
         await messageDialog.ShowAsync();
         AuthenticationService.RedictLoginPage();
         return;
     }
     PostBlogComment postBlogComment = new PostBlogComment();
     postBlogComment.BlogApp = this.BlogCommentViewModel.Blog.BlogApp;
     postBlogComment.Body = body;
     postBlogComment.ParentCommentId = "0";
     postBlogComment.PostId = this.BlogCommentViewModel.Blog.Id;
     PostResult postBlogCommentResponse = await BlogService.PostCommentAsync(postBlogComment);
     if (!postBlogCommentResponse.IsSuccess)
     {
         MessageDialog messageDialog = new MessageDialog(postBlogCommentResponse.Message);
         await messageDialog.ShowAsync();
         //其他异常则不处理
         if (postBlogCommentResponse.Message.Contains("登录"))
         {
             AuthenticationService.RedictLoginPage();
         }
         return;
     }
     else
     {
         //TODO:使用API,评论不会马上刷出来,需要改成http获取进行解析才可以实时显示最新评论
         //{ "Id":0,"IsSuccess":false,"Message":"请先登录!","Data":null}
         this.BlogCommentViewModel.Refresh();
     }
 }
开发者ID:GuojieLin,项目名称:CnBlogs,代码行数:35,代码来源:BlogCommentListPage.xaml.cs


示例14: OnTapped

		private void OnTapped(object sender, TappedRoutedEventArgs e)
		{
			if (Click != null)
				Click(sender, e);
			if (Command != null && Command.CanExecute(sender))
				Command.Execute(sender);
		}
开发者ID:fstn,项目名称:WindowsPhoneApps,代码行数:7,代码来源:RolloverButton.cs


示例15: PressedonChuck

 private void PressedonChuck(object sender, TappedRoutedEventArgs e)
 {
     if (this.Frame != null)
     {
         this.Frame.Navigate(typeof(ChuckN));
     }
 }
开发者ID:ebajaruns,项目名称:Edgarsss,代码行数:7,代码来源:GroupX.xaml.cs


示例16: OnButtonCheckClicked

        private async void OnButtonCheckClicked(object sender, TappedRoutedEventArgs tappedRoutedEventArgs)
        {
            provinceTextBlock.Text = String.Empty;
            stateTextBlock.Text = String.Empty;
            try
            {
                string registerNumber = FindRegisterNumber(textBoxRegisterNumber.Text);

                RegisterData registerDataFound = _registerDataBase.GetRegisterDataByRegisterNumber(registerNumber);

                if (registerDataFound == null)
                {
                    throw new Exception("Nie znaleziono podanej rejestracji");
                }

                provinceTextBlock.Text = "Województwo : " + registerDataFound.Province;
                stateTextBlock.Text = "Powiat : " + registerDataFound.State;
            }
            catch (Exception ex)
            {
                MessageDialog msgbox = new MessageDialog("Błąd : " + ex.Message);

                await msgbox.ShowAsync();
            }
        }
开发者ID:wgrzesiak147,项目名称:Rejestracje,代码行数:25,代码来源:MainPage.xaml.cs


示例17: Item1_Tapped

        private async void Item1_Tapped(object sender, TappedRoutedEventArgs e)
        {
            var grid = sender as Grid;
            if (grid != null)
            {
                string menuItemName = grid.Name;
                MessageDialog dialog = null;
                CoreDispatcher dispatcher = CoreWindow.GetForCurrentThread().Dispatcher;
                switch (menuItemName)
                {
                    case "Item1":
                        DrawerLayout.CloseDrawer();
                        break;
                    case "Item2":
                        DrawerLayout.CloseDrawer();
                        await dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => Frame.Navigate(typeof(Page2)));
                        break;
                    case "Item3":
                        await Windows.System.Launcher.LaunchUriAsync(new Uri("https://zing.vn/", UriKind.Absolute));
                        break;
                    case "Item4":
                        await dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => Frame.Navigate(typeof(Page3)));
                        break;
                }

                if (dialog != null) await dialog.ShowAsync();
            }
        }
开发者ID:1212050,项目名称:Solar-to-Lunar-Window-Phone-8.1,代码行数:28,代码来源:MainPage.xaml.cs


示例18: Grid_Tapped

		private void Grid_Tapped(object sender, TappedRoutedEventArgs e)
		{
			if (bottomBar.Visibility == Visibility.Visible)
				bottomBar.Visibility = Visibility.Collapsed;
			else
				bottomBar.Visibility = Visibility.Visible;
		}
开发者ID:dblleaf,项目名称:Huaban,代码行数:7,代码来源:ImageView.xaml.cs


示例19: OnIdentityProviderTapped

        private async void OnIdentityProviderTapped(object sender, TappedRoutedEventArgs e)
        {
            var identityProvider = (IdentityProvider)((FrameworkElement)e.OriginalSource).DataContext;

            var webAuthenticationResult = await WebAuthenticationBroker.AuthenticateAsync(
                        WebAuthenticationOptions.None,
                        new Uri(identityProvider.LoginUrl),
                        new Uri("http://authentication.brainthud.com/api/federationcallback/end"));

            var start = webAuthenticationResult.ResponseData.LastIndexOf('=') + 1;
            var nameIdentifier = webAuthenticationResult.ResponseData.Substring(start, webAuthenticationResult.ResponseData.Length - start);
            var cookies = this.getCookies(nameIdentifier);

            var uri = new Uri(@"http://www.brainthud.com/api/Cards/");
            var cookieContainer = new CookieContainer();

            foreach(var cookie in cookies)
            {
                var cookieItem = new Cookie(cookie.Key, cookie.Value);
                cookieContainer.Add(uri, cookieItem);
            }

            var handler = new HttpClientHandler();
            handler.CookieContainer =cookieContainer;
            var client = new HttpClient(handler);
            var response = client.GetAsync(uri).Result;
            var result = response.Content.ReadAsStringAsync().Result;
            var x = result;
        }
开发者ID:aenmeyk,项目名称:BrainThud,代码行数:29,代码来源:LoginView.xaml.cs


示例20: BackTapped

 private void BackTapped(object sender, TappedRoutedEventArgs e)
 {
     if (this.Frame.CanGoBack)
     {
         this.Frame.GoBack();
     }
 }
开发者ID:jpvarbed,项目名称:LifeFitHackathon,代码行数:7,代码来源:MealView.xaml.cs



注:本文中的Windows.UI.Xaml.Input.TappedRoutedEventArgs类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Media.Brush类代码示例发布时间:2022-05-26
下一篇:
C# Input.RightTappedRoutedEventArgs类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap