What is the difference between Width and ActualWidth in WPF?

前端 未结 7 761
不知归路
不知归路 2020-11-27 05:23

I am currently working with Panels in WPF, and I noticed that as regards the Width and Height properties, there are also two other pro

7条回答
  •  借酒劲吻你
    2020-11-27 05:56

    ActualWidth accounts for padding in the value so anytime you need to know that number you can call Actualwidth instead of width and avoid the calculation.

    edit: removed Margin b/c it isn't part of ActualWidth.

提交回复
热议问题