How to get Window width/height
-
I'm trying to get Window width by calling:
- Window.width
However it returns "undefined". It's the same for other Window properties:
- Window.height
- Window.x
- Window.maximumWidth
I tried to use it instead of calling some root Item:
- itemId.width
because in some Screen.onHeightChanged callback it returns 0.
Why is it undefined ? Do I make something wrong ?
-
@lajtu For
Screen
it works becausewidth
is an Attached Property for it.