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


C# Microsoft.TrackAsyncAction方法代码示例

本文整理汇总了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());
        }
开发者ID:r2d2rigo,项目名称:Win2D-Samples,代码行数:11,代码来源:MainPage.xaml.cs

示例2: canvasControl_CreateResources

        private void canvasControl_CreateResources(CanvasControl sender, Microsoft.Graphics.Canvas.UI.CanvasCreateResourcesEventArgs args)
        {
            CreateSizeDependentResources();

            if (ThumbnailGenerator.IsDrawingThumbnail)
            {
                args.TrackAsyncAction(LoadThumbnailResources(sender).AsAsyncAction());
            }
        }
开发者ID:SarahAnnTolsma,项目名称:Win2D,代码行数:9,代码来源:InkExample.xaml.cs

示例3: canvasMain_CreateResources

 private void canvasMain_CreateResources(CanvasAnimatedControl sender, Microsoft.Graphics.Canvas.UI.CanvasCreateResourcesEventArgs args)
 {
     args.TrackAsyncAction(CreateResourcesAsync(sender).AsAsyncAction());
 }
开发者ID:flameeyez,项目名称:win2d_text_game_world_generator,代码行数:4,代码来源:MainPage.xaml.cs

示例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;
            }
        }
开发者ID:liuywg,项目名称:Win2D-Samples,代码行数:16,代码来源:InkExample.xaml.cs

示例5: ImageVirtualControl_CreateResources

 private void ImageVirtualControl_CreateResources(CanvasVirtualControl sender, Microsoft.Graphics.Canvas.UI.CanvasCreateResourcesEventArgs args)
 {
     if (imageStream != null)
     {
         args.TrackAsyncAction(LoadVirtualBitmap().AsAsyncAction());
     }
 }
开发者ID:fengweijp,项目名称:Win2D,代码行数:7,代码来源:VirtualBitmapExample.xaml.cs

示例6: Canvas_CreateResources

        private void Canvas_CreateResources(CanvasAnimatedControl sender, Microsoft.Graphics.Canvas.UI.CanvasCreateResourcesEventArgs args)
        {

            args.TrackAsyncAction(PrepareRainday(sender).AsAsyncAction());
        }
开发者ID:Neilxzn,项目名称:RainDayForUAP,代码行数:5,代码来源:RainyDayCanvas.xaml.cs


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