I am currently working with Panel
s in WPF, and I noticed that as regards the Width
and Height
properties, there are also two other pro
ActualWidth
is set by the rendering system, and may be different depending on the widths of other elements and overall size constraints. As a result, it can not be changed. Width
is a property that can be changed, and should be used to increase or decrease the width of the element.
From MSDN:
This property is a calculated value based on other width inputs, and the layout system. The value is set by the layout system itself, based on an actual rendering pass, and may therefore lag slightly behind the set value of properties such as
Width
that are the basis of the input change.