Can not get the correct value of ActualWidth or ActualHeight after Loaded event on Desktop platform #17243
Labels
difficulty/tbd
Categorizes an issue for which the difficulty level needs to be defined.
kind/bug
Something isn't working
triage/potentially-fixed
Categorizes an issue as potentially fixed by some unlinked PR, fix needs to be verified
triage/untriaged
Indicates an issue requires triaging or verification
Current behavior
We can not get ActualWidth or ActualHeight value after Loaded event on Desktop platform. It is different from WinUI's behavior.
You can find the debug output
Width=0 Height=0
on Desktop platform, andWidth=1024 Height=720
on WinUI platform.Expected behavior
We can get the correct value of ActualWidth or ActualHeight after Loaded event on Desktop platform. The behavior is same as WinUI platform.
How to reproduce it (as minimally and precisely as possible)
And you can find the output in VisualStudio output window is difference on Desktop platform and WinUI platform.
You can find my code in https://github.com/lindexi/lindexi_gd/blob/eb445bd456345de745e16e73c58f3e8f1fe48216/UnoDemo/DalekairwiJebonacaki/DalekairwiJebonacaki/MainPage.xaml.cs
Workaround
No response
Works on UWP/WinUI
None
Environment
Uno.UI / Uno.UI.WebAssembly / Uno.UI.Skia
NuGet package version(s)
global.json:
Affected platforms
Skia (WPF), Skia (Linux X11), Skia (macOS), Skia (Linux Framebuffer), Skia (GTK)
IDE
Visual Studio 2022
IDE version
No response
Relevant plugins
No response
Anything else we need to know?
Reference : #16120 and #15982 and #15841
The text was updated successfully, but these errors were encountered: