简体   繁体   中英

How get dimension of a Control after Autosize in C# Winforms

How to I get the dimensions of a Control if it's using AutoSize? As I have a Panel and I need to know it's Width after it's auto re-sized and PanelName.Width only seems to give the original width.

This is with a Visual C# Windows Forms Application in Visual Studio 2013.

它应该为您提供实际值,您也可以订阅控件的SizeChanged事件并在其处理程序中获取实际值。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM