Esempio n. 1
0
        public void Deactivate()
        {
            if (mLayoutButton != null)
            {
                mLayoutButton.GetParent().Remove(mLayoutButton);
                mLayoutButton.Dispose();
            }

            if (mEditButton != null)
            {
                mEditButton.GetParent().Remove(mEditButton);
                mEditButton.Dispose();
            }

            if (mReplaceButton != null)
            {
                mReplaceButton.GetParent().Remove(mReplaceButton);
                mReplaceButton.Dispose();
            }

            if (mInsertButton != null)
            {
                mInsertButton.GetParent().Remove(mInsertButton);
                mInsertButton.Dispose();
            }

            if (mDeleteButton != null)
            {
                mDeleteButton.GetParent().Remove(mDeleteButton);
                mDeleteButton.Dispose();
            }

            if (mTitle != null)
            {
                mTitle.GetParent().Remove(mTitle);
                mTitle.Dispose();
            }

            if (mToolBarBackground != null)
            {
                mToolBarBackground.GetParent().Remove(mToolBarBackground);
                mToolBarBackground.Dispose();
            }

            if (mItemView != null)
            {
                mItemView.GetParent().Remove(mItemView);
                mItemView.Dispose();
            }

            if (mContentView != null)
            {
                Window.Instance.Remove(mContentView);
                mContentView.Dispose();
            }

            if (mToolBarLayer != null)
            {
                Window.Instance.RemoveLayer(mToolBarLayer);
                mToolBarLayer.Dispose();
            }

            Window.Instance.GetDefaultLayer().Behavior = Layer.LayerBehavior.Layer2D;
        }