internal void Dettach(Microsoft.Phone.Shell.IApplicationBar appBar) { if (_isAttached) { IsEnabled = false; RemoveItemFromAppBarCore(); InitialIndex = -1; Items = null; AppBar = null; _isAttached = false; } }
internal void Attach(Microsoft.Phone.Shell.IApplicationBar appBar, int initialIndex, IEnumerable <ApplicationBarMenuItem> items) { if (!_isAttached) { AppBar = appBar; InitialIndex = initialIndex; Items = items; AddItemToAppBarCore(); if (Command != null) { IsEnabled = Command.CanExecute(CommandParameter); } _isAttached = true; } }