Hm, you can’t get it (afaik) but you can pipe the data in through a parameter. You’d need to create a Dynamic Material Instance with a parameter and update the material when the widget changes size. You may need to call Force Layout Prepass just after updating widget size but before getting Desired Size to ensure you’re not fetching stale data.
I’m assuming you need more from this than just a border that autoscales as there’s a much better solution to this that fiddling with a material. Leaving a link just in case - Setting Image States: