コード例 #1
0
        /// <summary>
        /// Makes an item invisible. The item will appear as unchecked in the
        /// overflow menu.
        /// </summary>
        /// <param name="item">The item to make invisible.</param>
        public virtual void UncheckItem(RadPageViewOutlookItem item)
        {
            if (this.uncheckedItems.Contains(item))
            {
                return;
            }
            this.uncheckedItems.Add(item);
            item.Visibility = ElementVisibility.Collapsed;
            OutlookViewItemEventArgs args = new OutlookViewItemEventArgs(item);

            this.OnItemUnchecked(this, args);

            //Show the first possible hidden item in case we uncheck
            //an item that is among the visible items.
            if (!this.hiddenItems.Contains(item) &&
                this.GetCurrentlyVisibleItemsCount() <= this.layoutInfo.itemCount)
            {
                this.ShowFirstPossibleItem();
            }
        }
コード例 #2
0
        internal virtual bool ShowFirstPossibleItem()
        {
            if (this.hiddenItems.Count == 0)
            {
                return(false);
            }

            RadPageViewOutlookItem item = null;

            for (int i = this.hiddenItems.Count - 1; i > -1; i--)
            {
                item = this.hiddenItems[i];

                if (this.uncheckedItems.Contains(item))
                {
                    item = null;
                    continue;
                }
                else
                {
                    break;
                }
            }

            if (item == null)
            {
                return(false);
            }

            this.hiddenItems.Remove(item);

            item.Visibility = ElementVisibility.Visible;
            this.itemsContainer.UnregisterCollapsedItem(item);
            OutlookViewItemEventArgs args = new OutlookViewItemEventArgs(item);

            this.OnItemShown(this, args);
            return(true);
        }
コード例 #3
0
        private void OnAvailableItem_Click(object sender, EventArgs e)
        {
            RadMenuItem            radMenuItem = sender as RadMenuItem;
            RadPageViewOutlookItem tag         = radMenuItem.Tag as RadPageViewOutlookItem;

            if (radMenuItem.IsChecked)
            {
                this.owner.UncheckItem(tag);
                if (tag.AssociatedOverflowButton != null)
                {
                    tag.AssociatedOverflowButton.Visibility = ElementVisibility.Collapsed;
                }
            }
            else
            {
                this.owner.CheckItem(tag);
                if (tag.AssociatedOverflowButton != null)
                {
                    tag.AssociatedOverflowButton.Visibility = ElementVisibility.Visible;
                }
            }
            radMenuItem.IsChecked = !radMenuItem.IsChecked;
        }
コード例 #4
0
 public OutlookViewItemEventArgs(RadPageViewOutlookItem item)
 {
     this.item = item;
 }