Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

FrameworkElement::ActualHeight Property

 

Gets the rendered height of this element.

Namespace:   System.Windows
Assembly:  PresentationFramework (in PresentationFramework.dll)

public:
property double ActualHeight {
	double get();
}

Property Value

Type: System::Double

The element's height, as a value in device-independent units (1/96th inch per unit). The default value is 0 (zero).

This property is a calculated value based on other height 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 Height that are the basis of the input change.

Because ActualHeight is a calculated value, you should be aware that there could be multiple or incremental reported changes to it as a result of various operations by the layout system. The layout system may be calculating required measure space for child elements, constraints by the parent element, and so on.

Although you cannot set this property from XAML, you can base a Trigger upon its value in a style.

Identifier field

ActualHeightProperty

Metadata properties set to true

None

The following example displays various height properties.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 3.0
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Return to top
Show:
© 2016 Microsoft