You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
and draw something on the RegionsInvalidated event:
foreach (var region in args.InvalidatedRegions)
{
IRandomAccessStream random =
await RandomAccessStreamReference.CreateFromUri(new Uri("cake.png")).OpenReadAsync();
BitmapDecoder decoder = await BitmapDecoder.CreateAsync(random);
PixelDataProvider pixelData = await decoder.GetPixelDataAsync();
byte[] colorArray = pixelData.DetachPixelData();
using (var canvasRenderTarget = new CanvasRenderTarget(sender, 200, 200, 96))
{
canvasRenderTarget.SetPixelBytes(colorArray);
using (var drawingSession = sender.CreateDrawingSession(region))
{
drawingSession.DrawImage(canvasRenderTarget, 0, 0);
}
}
}
then after maximizing the window the CanvasVirtualControl.Size property becomes (0,0) and returns to the correct value after reducing the window size. UWP did not have this problem, but it appears in WinUI3. Is there any workaround?
The text was updated successfully, but these errors were encountered:
If you create a stretched grid on the whole window with
CanvasVirtualControl
:and draw something on the
RegionsInvalidated
event:then after maximizing the window the
CanvasVirtualControl.Size
property becomes (0,0) and returns to the correct value after reducing the window size. UWP did not have this problem, but it appears in WinUI3. Is there any workaround?The text was updated successfully, but these errors were encountered: