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
47
votes
3 answers

Why are ActualWidth and ActualHeight 0.0 in this case?

I have a Grid inside a Canvas defined like this:
Andre Pena
  • 56,650
  • 48
  • 196
  • 243
29
votes
4 answers

How to animate element height in React with ReactCSSTransitionGroup?

I'm trying to animate element height with ReactCSSTransitionGroup, so this is what I would want the animation looks like: http://jsfiddle.net/cherrry/hgk4Lme9/ The problem is that I don't always know the element height, so I tried to hack the…
Cherry Ng
  • 571
  • 1
  • 4
  • 9
9
votes
3 answers

ScrollViewer's Viewport Height VS Actual Height

Both are quite general terms but I'm curious to know when these height will be different apart from the case we're using Virtualization? One more question: I read on MSDN: If CanContentScroll is true, the values of the ExtentHeight,…
Rohit
  • 6,365
  • 14
  • 59
  • 90
9
votes
3 answers

How to force ActualWidth and ActualHeight to update (silverlight)

I a grid on my silverlight control, I am programatically adding a canvas, and in the canvas I am loading and displaying Image. I'm also adding a rotation to the canvas. The problem is that by default the CenterX and CenterY of the rotation is the…
Jeremy
  • 44,950
  • 68
  • 206
  • 332
8
votes
4 answers

Bind to ActualHeight of Item ItemsControl

I have two separate ItemsControls that appear side by side. The ItemsControls bind to the same ItemsSource, but they display the data differently. Each item displayed on the left will most likely be smaller than the same item on the right. This…
kevindaub
  • 3,293
  • 6
  • 35
  • 46
6
votes
2 answers

Why ActualWidth and ActualHeight start from 0,0?

I want to add WPF Path to InkCanvas and use selection to select WPF Path. So, I use this code. System.Windows.Shapes.Path path = drawCanvas.Children[i] as System.Windows.Shapes.Path; …
Hong Lim
  • 133
  • 1
  • 4
  • 12
5
votes
1 answer

Is it possible for a WPF control to have an ActualWidth and ActualHeight if it has never been rendered?

I need a Viewport3D for the sole purpose of doing geometric calculations using Petzold.Media3D.ViewportInfo. I would prefer not to have to place it in a Window or otherwise render it. I'm attempting to accomplish this by instantiating a Viewport3D…
devuxer
  • 41,681
  • 47
  • 180
  • 292
3
votes
4 answers

WPF - Image Control Actual Size

I have a problem in getting ActualHeight and ActualWidth of image control in WPF. When user selects the image file, I want to resize the selected image based on the dimensions of the image control. I tried to get the Image.ActualHeight and…
Harsha
  • 1,861
  • 7
  • 28
  • 56
3
votes
1 answer

ActualHeight and ActualWidth of object is always zero

I have a Canvas with a TextBlock like so:
Martin
  • 69
  • 1
  • 9
3
votes
3 answers

WPF - Binding and RenderTransform

I would like to bind a scaleTransform to a converter passing the ActualWidth or ActualHeight. Here what I want to do :
Florian
2
votes
1 answer

ActualHeight / ActualWidth

I'm a little confused with how ActualWidth or ActualHeight works or how it gets calculated.
Michael
  • 2,088
  • 6
  • 29
  • 47
2
votes
1 answer

Why is ActualHeight set to NaN?

I am new to Silverlight and I just wanted to ask why my ActualHeight was set to NaN? It has a width and height of 500, but when compiled, it gives an error that says that ActualHeight is equal to NaN. Is there some other way to do this? Any help…
Nathan
  • 1,520
  • 1
  • 12
  • 21
2
votes
1 answer

Overriding ActualWidth and ActualHeight dependency properties

I have a custom line shape with start and end point. The ActualWidth and ActualHeight properties however do not return the correct value, that is the difference between the points. Is there a way to override these properties in the derived class,…
mihajlv
  • 2,275
  • 4
  • 36
  • 59
2
votes
1 answer

Get actual height at load time

I'm making a user control for a data grid. This data grid has some old and new entries. It is required that the new entries are shown at the top of the screen yet the order of data has to be chronological. So I am pushing the whole grid upwards by…
Bart Pinnock
  • 153
  • 2
  • 10
2
votes
1 answer

Binding to ActualHeight does not work

I tried to create a custom control, having a semitransparent rounded background:
serhio
  • 28,010
  • 62
  • 221
  • 374
1
2 3 4