Replace usage of Item.window with Window attached property

Change-Id: Ic33d645ba384697f761540e277507ad56617e2fb
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>