Get the size of UCanvasPanel C++

Hello, I need to get the size of UCanvasPanel c++

.h
    
UPROPERTY(meta = (BindWidget))
class UCanvasPanel* MyCanvas;

I need to get inside a Vector2D X and Y the size of my panel, the panel is created from the designer but I call it using BindWidget.

There’s FVector2D UWidget::GetDesiredSize() method, but I’ve never used it myself, in code, plus, if you need to get some coordinates inside of your Canvas panel, you’ll have to keep in mind DPI scale of your viewport.
I recently moved all of my widgets to blueprints because of many troubles in handling them inside code. But fortunately in my project it was possible.

thanks I was able to solve it. but the value returns 0, so I had to add another panel inside that one with the same dimensions and if it works.