當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。