How to get widget border dimensions from C++

Hello,

I have a blueprint widget that contains a main border from which I wish to get the dimensions.
I am using this widget to create an SWindow and I would like to use the main border dimensions as the window’s (for now I have to use hard coded values that match the UI’s).
Here’s how I get my widget content to add it to the window.

UClass* widgetClass = StaticLoadClass(UUserWidget::StaticClass(), nullptr, TEXT(“/Game/UI/MyWidget.MyWidget_C”));
UUserWidget* widgetScreen = CreateWidget(world, widgetClass );
TSharedPtr inputWidget = widgetScreen->TakeWidget();

Thank you for your answers.