Questions tagged [actualheight]

ActualHeight is set by the rendering system, and may be different depending on the heights of other elements and overall size constraints. As a result, it can not be changed.

  • window.innerHeight/Width : Provided by most browsers, but not Internet Explorer 8-, and even in Internet Explorer 9+, it is not available in quirks mode.
  • document.body.clientHeight/Width : Provided by many browsers, including Internet Explorer.
  • document.documentElement.­clientHeight/Width :Provided by most DOM browsers, including Internet Explorer.

                  |             | document.    | document.
                  | window      | body.        | documentElement.
Browser           | innerHeight | clientHeight | clientHeight
------------------| ------------|--------------|-----------------
Opera 9.5+ strict |  window     | document     | window
Opera 9.5+ quirks |  window     | window       | document
Opera 7-9.2       |  window     | window       | document
Opera 6           |  window     | window       | N/A
Mozilla strict    |  window     | document     | window
Mozilla quirks    |  window     | window       | document
Newer KHTML       |  window     | document     | window
Older KHTML       |  window     | document     | document
Chrome/Safari 4+  |  window     | document     | window
Safari 3-         |  window     | document     | document
iCab 3            |  window     | document     | document
iCab 2            |  window     | window       | N/A
IE 9+ strict      |  window     | document     | window
IE 6-8 strict     |  N/A        | document     | window
IE 5+ quirks      |  N/A        | window       | 0
IE 4              |  N/A        | window       | N/A
ICEbrowser        |  window     | window       | document
Tkhtml Hv3        |  window     | window       | document
Netscape 4        |  window     | N/A          | N/A
46 questions
-1
votes
1 answer

FrameworkElement.ActualHeight { get; } always giving 0

This is my c# code: double height = grid.ActualHeight; double newHeight = height - rectangle.ActualHeight; topRectangle.Height = newHeight; label.Content = "height: " + height + "\nNew Height: " + newHeight; and the xaml file is this:
Nekidev
  • 69
  • 1
  • 1
  • 8
1 2 3
4