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
2
votes
2 answers

Binding position to ActualHeight

I want to bind a lists position to its own height in XAML. So its lower left corner always will be at 0.0 of the canvas. I'm using elementBinding to get the ActualHeight and a converter to invert the property. But the height sent to the converter is…
Qanik
  • 23
  • 2
2
votes
2 answers

When text wraps within TextBlock, ActualHeight is incorrect

I have a TextBlock with a Border around it that's inside of a Canvas that I'm using to animate it as part of a custom control. The block slides in from the bottom of the screen over the top of the image. I'm trying to use the ActualHeight of the…
UmmmActually
  • 217
  • 3
  • 12
2
votes
1 answer

ActualHeight / ActualWidth of Border is not as expected when binding it dynamically

I have two borders in a Grid in a UserControl. First border is in row one and second border is is in row two.
asitis
  • 3,023
  • 1
  • 31
  • 55
1
vote
1 answer

ActualHeight binding does not update

I am trying to set up a binding to the ActualHeight of a FrameworkElement. It only seems to update once, but never updates after that. I tested this in a simple silverlight application with this markup, and it doesn't update when the browser window…
Brian Kohrs
  • 279
  • 3
  • 9
1
vote
2 answers

silverlight NaN height and width, ActualHeight and ActualWidth also return 0.0 - what is the workaround?

popUpControl and listBoxControl below are returning NaN as the height and width. The ActualHeight is also 0.0 Why? and more importantly what is the workaround for this?
VoodooChild
  • 9,776
  • 8
  • 66
  • 99
1
vote
2 answers

wpf - measuring the actual width and actual height

I have defined a Grid in XAML like, which is also a part of the other defined grids in xaml file. In C# file in Constructor,…
Kapparino
  • 988
  • 11
  • 33
1
vote
1 answer

Get height of content items

Cannot determine Height or ActualHeight of the following:
Chuck Savage
  • 11,775
  • 6
  • 49
  • 69
1
vote
1 answer

WPF dependecy property changed ActualWidth == 0

How do I force a Window to measure its controls in the constructor so the values of ActualWidth and ActualHeight aren't zero? Here is the sample demonstrating my problem (I tried to call Measure and Arrange functions, but maybe in a wrong…
1
vote
1 answer

Binding Width to ActualHeight - only partially working

I am trying to bind an image's Width to its ActualHeight (height is determined by layout and I want it to be square - if there's a better way of doing this, I'd love to hear). This is my XAML:
Shahar Prish
  • 4,838
  • 3
  • 26
  • 47
1
vote
2 answers

Unable to retrieve the ActualWidth / ActualHeight of ContentPresenter

In my application, we have a view model object from which we're retrieving its attached FrameworkElement using our custom function GetVisualChildWithDataContext (see below). What's happening is that this function returns a ContentPresenter object…
SuperOli
  • 1,784
  • 1
  • 11
  • 23
0
votes
2 answers

Scrollviewer ActualHeight exceeds the screen resolution

I have a Grid with these rows settings: (I can't post much code, sorry) RowDefinition Height="1*" RowDefinition Height="120" Inside that grid I have a ScrollViewer with Height="Auto" and verticalAlignment = "Stretch" at Row 0. At row 2 I have…
alansiqueira27
  • 8,129
  • 15
  • 67
  • 111
0
votes
3 answers

getting the size of the combobox's popup at runtime

I am trying to get the width and height of a Silverlight ComboBox's dropdown window. Unfortunately ActualWidth and ActualHeight are returning 0 always.
phm
  • 1,160
  • 1
  • 17
  • 29
0
votes
1 answer

DevExpress BaseLayoutItem Size

In WPF how can I find the size of a DevExpress BaseLayoutItem? It inherits from ContentElement so has no ActualHeight or ActualWidth.
Jon Mitchell
  • 3,349
  • 5
  • 27
  • 37
0
votes
1 answer

wpf ScrollViewer and SizeChanged event

Can anyone explain to me the relationship between ScrollViewer and SizeChanged event? Whenever I put a scrollViewer around a grid, numerous SizeChanged event gets fired. What is the relationship between the two? Thanks a lot. EDIT: From mdm20's…
thomas1234
  • 599
  • 3
  • 6
  • 15