本文整理汇总了C#中Microsoft.TrackAsyncAction方法的典型用法代码示例。如果您正苦于以下问题:C# Microsoft.TrackAsyncAction方法的具体用法?C# Microsoft.TrackAsyncAction怎么用?C# Microsoft.TrackAsyncAction使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Microsoft
的用法示例。
在下文中一共展示了Microsoft.TrackAsyncAction方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Canvas_CreateResources
private void Canvas_CreateResources(Microsoft.Graphics.Canvas.UI.Xaml.CanvasControl sender, Microsoft.Graphics.Canvas.UI.CanvasCreateResourcesEventArgs args)
{
// Create instance of radial gradient brush; the center will be transparent and the extremes opaque black.
radialBrush = new CanvasRadialGradientBrush(sender, Colors.Transparent, Colors.Black);
// Load image to draw.
args.TrackAsyncAction(Task.Run(async () =>
{
image = await CanvasBitmap.LoadAsync(sender, new Uri("ms-appx:///SpotlightImage.png"));
}).AsAsyncAction());
}
示例2: canvasControl_CreateResources
private void canvasControl_CreateResources(CanvasControl sender, Microsoft.Graphics.Canvas.UI.CanvasCreateResourcesEventArgs args)
{
CreateSizeDependentResources();
if (ThumbnailGenerator.IsDrawingThumbnail)
{
args.TrackAsyncAction(LoadThumbnailResources(sender).AsAsyncAction());
}
}
示例3: canvasMain_CreateResources
private void canvasMain_CreateResources(CanvasAnimatedControl sender, Microsoft.Graphics.Canvas.UI.CanvasCreateResourcesEventArgs args)
{
args.TrackAsyncAction(CreateResourcesAsync(sender).AsAsyncAction());
}
示例4: canvasControl_CreateResources
private void canvasControl_CreateResources(CanvasControl sender, Microsoft.Graphics.Canvas.UI.CanvasCreateResourcesEventArgs args)
{
CreateSizeDependentResources();
if (ThumbnailGenerator.IsDrawingThumbnail)
{
args.TrackAsyncAction(LoadThumbnailResources(sender).AsAsyncAction());
}
needToCreateSizeDepdendentResources = false;
if(args.Reason != CanvasCreateResourcesReason.FirstTime)
{
needsInkSurfaceValidation = true;
}
}
示例5: ImageVirtualControl_CreateResources
private void ImageVirtualControl_CreateResources(CanvasVirtualControl sender, Microsoft.Graphics.Canvas.UI.CanvasCreateResourcesEventArgs args)
{
if (imageStream != null)
{
args.TrackAsyncAction(LoadVirtualBitmap().AsAsyncAction());
}
}
示例6: Canvas_CreateResources
private void Canvas_CreateResources(CanvasAnimatedControl sender, Microsoft.Graphics.Canvas.UI.CanvasCreateResourcesEventArgs args)
{
args.TrackAsyncAction(PrepareRainday(sender).AsAsyncAction());
}