Casting a type for button item