本文整理汇总了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);
}
}
示例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) });
}
示例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
}
示例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;
}
示例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;
}
示例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));
}
}
示例7: MainPlayer_MediaFailed
private void MainPlayer_MediaFailed(object sender, ExceptionRoutedEventArgs e)
{
NoticeTxt.Visibility = Visibility.Visible;
MainPlayer.Visibility = Visibility.Collapsed;
}
示例8: MediaElement_MediaFailed
private void MediaElement_MediaFailed(object sender, ExceptionRoutedEventArgs e)
{
DisplayErrorMessage(e.ErrorMessage);
}
示例9: mediaElement_MediaFailed
private async void mediaElement_MediaFailed(object sender, ExceptionRoutedEventArgs e)
{
await PlayMovies();
}
示例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");
}
示例11: RealImage_ImageFailed
private void RealImage_ImageFailed(object sender, ExceptionRoutedEventArgs e)
{
LoadImage.Visibility = Visibility.Visible;
}
示例12: OnSourceImageFailed
private void OnSourceImageFailed(object sender, ExceptionRoutedEventArgs e)
{
var source = (BitmapImage)sender;
Debug.WriteLine("Failed: " + source.UriSource);
source.ImageOpened -= OnSourceImageOpened;
source.ImageFailed -= OnSourceImageFailed;
}
示例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));
}
示例14: Instance_MediaFailed
void Instance_MediaFailed(object sender, ExceptionRoutedEventArgs e)
{
MediaFailed?.Invoke(this, new EventArgs());
}
示例15: _player_MediaFailed
void _player_MediaFailed(object sender, ExceptionRoutedEventArgs e)
{
_clocktimer.Stop();
}