public void RegisterCollapsedItem(RadPageViewOutlookItem stackItem)
        {
            RadPageViewOutlookAssociatedButton collapsedItemButton = this.CreateCollapsedItemButton(stackItem);

            collapsedItemButton.Click         += new EventHandler(this.OnHiddenItemButton_Click);
            stackItem.AssociatedOverflowButton = collapsedItemButton;
            collapsedItemButton.ToolTipText    = stackItem.Text;
            this.buttonsContainer.Children.Insert(0, (RadElement)collapsedItemButton);
        }
        public void RegisterCollapsedItem(RadPageViewOutlookItem stackItem)
        {
            Debug.Assert(stackItem.AssociatedOverflowButton == null, "Registering an item which already has an associated overflow button.");
            RadPageViewOutlookAssociatedButton buttonElement = this.CreateCollapsedItemButton(stackItem);

            buttonElement.Click += this.OnHiddenItemButton_Click;
            stackItem.AssociatedOverflowButton = buttonElement;
            buttonElement.ToolTipText          = stackItem.Text;
            this.buttonsContainer.Children.Insert(0, buttonElement);
        }
        private RadPageViewOutlookAssociatedButton CreateCollapsedItemButton(RadPageViewOutlookItem item)
        {
            RadPageViewOutlookAssociatedButton buttonElement = new RadPageViewOutlookAssociatedButton();

            buttonElement.StretchVertically = true;
            buttonElement.ThemeRole         = "ItemAssociatedButton";
            if (item.Image != null)
            {
                buttonElement.Image = item.Image;
            }
            else
            {
                buttonElement.Image = RadPageViewOutlookElement.AssociatedButtonDefaultImage;
            }
            buttonElement.Tag = item;
            return(buttonElement);
        }
        private RadPageViewOutlookAssociatedButton CreateCollapsedItemButton(
            RadPageViewOutlookItem item)
        {
            RadPageViewOutlookAssociatedButton associatedButton = new RadPageViewOutlookAssociatedButton();

            associatedButton.StretchVertically = true;
            associatedButton.ThemeRole         = "ItemAssociatedButton";
            if (item.Image != null)
            {
                associatedButton.Image = item.Image;
            }
            else
            {
                associatedButton.Image = (Image)RadPageViewOutlookElement.AssociatedButtonDefaultImage;
            }
            associatedButton.Tag = (object)item;
            return(associatedButton);
        }