Detach() public method

Detaches the associated ApplicationBarIconButton from the ApplicationBar and from this instance.
public Detach ( ) : void
return void
        private void DetachButton(BindableApplicationBarButton button)
        {
            if (button.GetBindingExpression(DataContextProperty) == null &&
                button.GetValue(DataContextProperty) == this.DataContext)
            {
                button.DataContext = null;
            }

            button.Detach();
        }