Template10 icon indicating copy to clipboard operation
Template10 copied to clipboard

NavButtonBehavior Current_SizeChanged causes lags when resizing

Open ivesely opened this issue 11 years ago • 2 comments

Resizing Application in Minimal Template after navigating to detail page is not fluent. it's caused by Calculate method. Resolved with #292

ivesely avatar Nov 06 '15 06:11 ivesely

Please try

async void SizeChanged() { await Task.Run(() => Calculate()); }

A timer is a heavy approach to this problem.

JerryNixon avatar Nov 07 '15 00:11 JerryNixon

Hi, I have found that Calculate() method must run in Gui thread. so I tried this

    await Task.Factory.StartNew(() =>
    {
      Calculate();
    }, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.FromCurrentSynchronizationContext())

Resizing is more fluent, but it is not so good as with the timer approach.

ivesely avatar Nov 09 '15 08:11 ivesely