Skip to content
Discussion options

You must be logged in to vote

UiElement.Width return perfect value after the UiElement Fully Loaded on Screen.

<Border Loaded="GoogleLoginBorder_OnLoaded"/>
private async void GoogleLoginBorder_OnLoaded(object? sender, EventArgs e)
{
    await Task.Delay(500);
    var border = (Border)sender;
    Console.WriteLine(border.Width);
    Console.WriteLine(border.Height);
}

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
5 replies
@RedEye-Developers
Comment options

@jingliancui
Comment options

@RedEye-Developers
Comment options

@jingliancui
Comment options

@RedEye-Developers
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by RedEye-Developers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants