Browse Source
Merge pull request #9065 from ShadowMarker789/Issue-9064-Screen-Page-Crash
Fix for Issue 9064 - Dispatcher call instead
disbar
Max Katz
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
1 deletions
-
samples/ControlCatalog/Pages/ScreenPage.cs
|
|
|
@ -5,6 +5,7 @@ using Avalonia.Controls; |
|
|
|
using Avalonia.Media; |
|
|
|
using Avalonia.Platform; |
|
|
|
using Avalonia.Rendering; |
|
|
|
using Avalonia.Threading; |
|
|
|
|
|
|
|
namespace ControlCatalog.Pages |
|
|
|
{ |
|
|
|
@ -41,7 +42,7 @@ namespace ControlCatalog.Pages |
|
|
|
if (screen.Bounds.X / 10f < _leftMost) |
|
|
|
{ |
|
|
|
_leftMost = screen.Bounds.X / 10f; |
|
|
|
InvalidateVisual(); |
|
|
|
Dispatcher.UIThread.Post(InvalidateVisual, DispatcherPriority.Background); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
|