I am currently working with Panels in WPF, and I noticed that as regards the Width and Height properties, there are also two other properties called ActualWidth and ActualHeight.
ActualWidthGets the rendered width of this element. This is a dependency property. (Inherited from FrameworkElement.)
WidthGets or sets the width of the element. This is a dependency property. (Inherited from FrameworkElement.)
Reference: MSDN
Can anyone point out the differences between the two and when to use either one ?
Width/Heightis the requested or layout size. If you set to Auto, then the value isdouble.NaNwhen you access the property in code behind.ActualWidth/ActualHeightandRenderSize.Width/RenderSize.Heightboth return the element’s rendered size, as RenderSize is of type Size. If you want/need the actual size of the item, then use any of these attributes.