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

C# Xaml.ExceptionRoutedEventArgs类代码示例

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

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



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

示例1: OnMediaFailed

 private async void OnMediaFailed(object sender, ExceptionRoutedEventArgs e)
 {
     if (this.ViewModel != null)
     {
         await this.ViewModel.OnMediaFailedAsync(e.ErrorMessage);
     }
 }
开发者ID:cjgaliana,项目名称:XamarinVideos,代码行数:7,代码来源:PlayerView.xaml.cs


示例2: ImageOnImageFailed

 private void ImageOnImageFailed(object sender, ExceptionRoutedEventArgs exceptionRoutedEventArgs)
 {
     var image = (Image) sender;
     image.ImageOpened -= ImageOnImageOpened;
     image.ImageFailed -= ImageOnImageFailed;
     Children.Add(new TextBlock { Text = exceptionRoutedEventArgs.ErrorMessage, Foreground = new SolidColorBrush(Colors.Red) });
 }
开发者ID:grdaneault,项目名称:the-alpha,代码行数:7,代码来源:TileCanvas.cs


示例3: videoMediaElement_MediaFailed

        private async void videoMediaElement_MediaFailed(object sender, ExceptionRoutedEventArgs e)
        {
            // get HRESULT from event args 
            MessageDialog dialog = new MessageDialog(GetHresultFromErrorMessage(e));
            await dialog.ShowAsync();

            // Handle media failed event appropriately 
        }
开发者ID:zirakai,项目名称:NyxoWp,代码行数:8,代码来源:VideoPlayer.xaml.cs


示例4: Image_ImageFailed

        private void Image_ImageFailed(object sender, ExceptionRoutedEventArgs e)
        {
            Image img = sender as Image;
            //Grid title = (img.Parent as Grid).FindName("grTitle") as Grid;
            img.Source = new Windows.UI.Xaml.Media.Imaging.BitmapImage(new Uri(WinAppLibrary.Utilities.Helper.BaseUri + Lib.ContentPath.DefaultDrawing));

            //title.Visibility = Windows.UI.Xaml.Visibility.Visible;
        }
开发者ID:paraneye,项目名称:WinApp,代码行数:8,代码来源:SubMenu.xaml.cs


示例5: GetHresultFromErrorMessage

        private string GetHresultFromErrorMessage(ExceptionRoutedEventArgs e)
        {
            String hr = String.Empty;
            String token = "HRESULT - ";
            const int hrLength = 10;     // eg "0xFFFFFFFF"

            int tokenPos = e.ErrorMessage.IndexOf(token, StringComparison.Ordinal);
            if (tokenPos != -1)
            {
                hr = e.ErrorMessage.Substring(tokenPos + token.Length, hrLength);
            }

            return hr;
        }
开发者ID:zirakai,项目名称:NyxoWp,代码行数:14,代码来源:VideoPlayer.xaml.cs


示例6: TheImageOnImageFailed

        private void TheImageOnImageFailed(object sender, ExceptionRoutedEventArgs exceptionRoutedEventArgs)
        {
            var source = this.theImage.Source;
            if (source is BitmapImage)
            {
                var bmp = source as BitmapImage;
                if (bmp.UriSource == null) return;
                var tmpUrl = bmp.UriSource.ToString();

                if (Url2.IsNullOrEmpty()) return;
                if (Equals(Url1, Url2)) return;
                if (Equals(Url2, tmpUrl)) return;
                if (Equals(Url1, tmpUrl))
                    this.theImage.Source = new BitmapImage(new Uri(Url2));
            }
        }
开发者ID:altima,项目名称:openhabUWP,代码行数:16,代码来源:ChartWidget.xaml.cs


示例7: MainPlayer_MediaFailed

 private void MainPlayer_MediaFailed(object sender, ExceptionRoutedEventArgs e)
 {
     NoticeTxt.Visibility = Visibility.Visible;
     MainPlayer.Visibility = Visibility.Collapsed;
 }
开发者ID:superceix,项目名称:BUPT_IPTV,代码行数:5,代码来源:Player.xaml.cs


示例8: MediaElement_MediaFailed

 private void MediaElement_MediaFailed(object sender, ExceptionRoutedEventArgs e)
 {
     DisplayErrorMessage(e.ErrorMessage);
 }
开发者ID:Strongc,项目名称:FFmpegInterop,代码行数:4,代码来源:MainPage.xaml.cs


示例9: mediaElement_MediaFailed

 private async void mediaElement_MediaFailed(object sender, ExceptionRoutedEventArgs e)
 {
     await PlayMovies();
 }
开发者ID:golf1052,项目名称:AppleFlyover,代码行数:4,代码来源:MainPage.xaml.cs


示例10: ImageF_ImageFailed

 private void ImageF_ImageFailed(object sender, ExceptionRoutedEventArgs e)
 {
     var source = (sender as Image).Source as Windows.UI.Xaml.Media.Imaging.BitmapImage;
     source.UriSource = new Uri(WinAppLibrary.Utilities.Helper.BaseUri + "/Assets/common_default_foreman.png");
 }
开发者ID:paraneye,项目名称:WinApp,代码行数:5,代码来源:SelectIWP.xaml.cs


示例11: RealImage_ImageFailed

 private void RealImage_ImageFailed(object sender, ExceptionRoutedEventArgs e)
 {
     LoadImage.Visibility = Visibility.Visible;
 }
开发者ID:PragyaGupta-Mobikwik,项目名称:MobiKwik10,代码行数:4,代码来源:UC_ImageLoader.xaml.cs


示例12: OnSourceImageFailed

 private void OnSourceImageFailed(object sender, ExceptionRoutedEventArgs e)
 {
     var source = (BitmapImage)sender;
     Debug.WriteLine("Failed: " + source.UriSource);
     source.ImageOpened -= OnSourceImageOpened;
     source.ImageFailed -= OnSourceImageFailed;
 }
开发者ID:karpinsn,项目名称:AntStrength,代码行数:7,代码来源:ImageExtensions.cs


示例13: FlipImage_ImageFailed

 private void FlipImage_ImageFailed(object sender, ExceptionRoutedEventArgs e)
 {
     FlipImage.Source = new Windows.UI.Xaml.Media.Imaging.BitmapImage(new Uri(WinAppLibrary.Utilities.Helper.BaseUri + Lib.ContentPath.DefaultDrawing));
 }
开发者ID:paraneye,项目名称:WinApp,代码行数:4,代码来源:ScheduleComponents.xaml.cs


示例14: Instance_MediaFailed

 void Instance_MediaFailed(object sender, ExceptionRoutedEventArgs e)
 {
     MediaFailed?.Invoke(this, new EventArgs());
 }
开发者ID:robUx4,项目名称:vlc-winrt,代码行数:4,代码来源:MFService.cs


示例15: _player_MediaFailed

 void _player_MediaFailed(object sender, ExceptionRoutedEventArgs e)
 {
   _clocktimer.Stop();
 }
开发者ID:mousadialo,项目名称:MicrosoftHLSSDK,代码行数:4,代码来源:PlaybackStatusUI.xaml.cs


示例16: MediaElement_MediaFailed

 /// <summary>
 /// This method is called when the Media failed.
 /// </summary>
 private void MediaElement_MediaFailed(object sender, ExceptionRoutedEventArgs e)
 {
     LogMessage("Media failed: " + e.ErrorMessage);
     CurrentMediaUrl = string.Empty;
     CurrentPosterUrl = string.Empty;
     ReleaseDisplay();
     UpdateControls();
 }
开发者ID:flecoqui,项目名称:Windows10,代码行数:11,代码来源:MainPage.xaml.cs


示例17: OnImageFailed

 void OnImageFailed(object sender, ExceptionRoutedEventArgs e)
 {
     VisualStateManager.GoToState(this, "Failed", true);
 }
开发者ID:llenroc,项目名称:AwfulMetro,代码行数:4,代码来源:ImageLoader.xaml.cs


示例18: onImageFailed

 void onImageFailed(object sender, ExceptionRoutedEventArgs e)
 {
     Debug.WriteLine("Enter onImageFailed : " + e.ErrorMessage);
       BitmapImage bitmapImage = new BitmapImage(new Uri("ms-appx:///Assets/diab_logo_transparent.png"));
       this.moduleIcon.Source = bitmapImage;
 }
开发者ID:DiabHelp,项目名称:DiabHelp-App-WP,代码行数:6,代码来源:ModuleLayout.xaml.cs


示例19: Image_ImageFailed

 private void Image_ImageFailed(object sender, ExceptionRoutedEventArgs e)
 {
     throw new InvalidOperationException(e.ErrorMessage);
 }
开发者ID:simionliviumihai,项目名称:TrackMyDrinks,代码行数:4,代码来源:LightCategory.xaml.cs


示例20: VideoOnError

 /// <summary>
 /// Common video failed error handler.
 /// </summary>
 /// <param name="obj"></param>
 /// <param name="args"></param>
 public void VideoOnError(Object obj, ExceptionRoutedEventArgs args)
 {
     NotifyUser("Cannot open video file - error: " + args.ErrorMessage, NotifyType.ErrorMessage);
 }
开发者ID:ckc,项目名称:WinApp,代码行数:9,代码来源:SampleConfiguration.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# Xaml.FrameworkElement类代码示例发布时间:2022-05-26
下一篇:
C# Xaml.DragEventArgs类代码示例发布时间: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