Added toggle functionality to the AppBarButton

A first draft for the toggle functionality. Please review and discuss before merge.