当前位置: 首页>>代码示例>>C#>>正文


C# Xaml.ExceptionRoutedEventArgs类代码示例

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


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


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