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
0
votes
1 answer

How to get value of ActualHeight, pass it into a converter which feeds the result into ActualWidth

newbie to xaml here. I have a question for you all. I have a UserControl called "ResourceMonitor" and I am trying to make sure that when its surrounding task bar gets scaled (already written and tested), that the ActualWidth of my UserControl …
0
votes
1 answer

Obtaining Canvas dimensions wpf

I have the following code: Xaml
Idanis
  • 1,918
  • 6
  • 38
  • 69
0
votes
0 answers

Auto height for windows control

I have winform hosting WPF control text block where the contents of text block is dynamic. I want to set the height of the text block based on content. mean while text block is hosted in windows usercontrol (TitleBarHost) and in turn this windows…
Chethan
  • 298
  • 1
  • 4
  • 17
0
votes
1 answer

Line element Y value not Binding to Parent StackPanel ActualHeight property

In my MainPage. I have a Grid with 1 row, and 2 columns. Both columns have a StackPanel each. The left column StackPanel has an "Add" button (so it has an initial height of 100 units); the right column StackPanel is empty. On clicking the "Add"…
Freakishly
  • 1,533
  • 5
  • 32
  • 61
0
votes
1 answer

WPF: Grid's ActualHeight is not changed

I have a Button containing a Grid inside:
undermind
  • 1,779
  • 13
  • 33
0
votes
1 answer

In WPF, how do I get the true size of a FrameworkElement?

In WPF, how do I get the true size of a FrameworkElement, including the extra size that an effect such as a drop shadow adds? I have a button with a drop shadow on it. I am programmatically outputting it to a PNG file. I use ActualWidth and…
Kyle
  • 21,377
  • 37
  • 113
  • 200
0
votes
1 answer

binding declared in xaml does not work

I have a main window which contains a grid, during the window loaded event, I will dynamically create an instance of a user control and add it to grid. In order to let the user control to adapt itself when the main window is resized, I want to bind…
intangible02
  • 993
  • 1
  • 9
  • 19
0
votes
1 answer

How to know the details of calculated ActualWidth/ActualHeight

We were working on a WPF application project, and the 'about 1px problem' puzzled us a lot. Finally, we guess maybe the problem about Width and ActualWidth. For instance, we set Border width to 160px, and the actual width would be 160.4px. Any…
user1031200
0
votes
2 answers

Try to get actual width & height of a element with jQuery

I'm trying to get the width & height of a element with jQuery. Now I have a function that wraps a span around the element and gets the size from the temporary span element. HTML click
Pieter
  • 38
  • 9
0
votes
1 answer

WPF MediaElement ActualWidth and ActualHeight is always zero

For some unknown reason I cannot get my MediaElement to show up when I use it in a ControlTemplate. I have installed snoop and I have determined that the ActualWidth and ActualHeight is always zero, if I put the same media element on the main window…
Mark
  • 14,820
  • 17
  • 99
  • 159
0
votes
1 answer

Object's ActualWidth and ActualHeight reporting as 0?

I have an application that contains several instances of a Grid that inherits from an Abstract class extending UserControl like this:
Saggio
  • 2,212
  • 6
  • 33
  • 50
0
votes
2 answers

ActualWidth and ActualHeight of custom control in grid are zero, even after measure/arrange

I have a Win8 app with a custom control, GameView, which I have instantiated three times (as gvMap, gvOurBase, and gvEnemyBase) on my page, and placed into a grid. I need to get the actual size of the control so I can set the RenderTransform and…
ekolis
  • 6,270
  • 12
  • 50
  • 101
0
votes
1 answer

Use of ItemsControl ActualHeight to paginate a printed XAML form?

I need to generate a printed form using XAML that has a header grid and a variable number of rows that can result in multiple pages as the number of rows increases. The header must appear on each page and each row may vary in height due to text…
e-holder
  • 1,504
  • 4
  • 20
  • 33
0
votes
2 answers

Why would actual width be zero when width is set to a value. WPF

I have a class that extends a Canvas. On creation I explicitly set its width to a value: Public Sub New(w As Integer, h As Integer) Me.Width = w Me.Height = h End Sub Now I add instances of this to a canvas to another canvas using…
blaffie
  • 505
  • 1
  • 10
  • 32
0
votes
3 answers