Browse Source
Merge pull request #5818 from AvaloniaUI/native-control-host-position
NativeControlHost: fixed absolute bounds calculation
release/0.10.1
Max Katz
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
1 deletions
-
src/Avalonia.Controls/NativeControlHost.cs
|
|
|
@ -120,7 +120,7 @@ namespace Avalonia.Controls |
|
|
|
private Rect? GetAbsoluteBounds() |
|
|
|
{ |
|
|
|
var bounds = Bounds; |
|
|
|
var position = this.TranslatePoint(bounds.Position, _currentRoot); |
|
|
|
var position = this.TranslatePoint(default, _currentRoot); |
|
|
|
if (position == null) |
|
|
|
return null; |
|
|
|
return new Rect(position.Value, bounds.Size); |
|
|
|
|