Esempio n. 1
0
 protected override void OnPropertyChanged(RadPropertyChangedEventArgs e)
 {
     base.OnPropertyChanged(e);
     if (e.Property == RadElement.RightToLeftProperty)
     {
         RadPageViewElementBase itemsParent = this.ItemsParent as RadPageViewElementBase;
         if (this.RightToLeft)
         {
             int num = (int)this.SetDefaultValueOverride(RadPageViewStripElement.StripAlignmentProperty, (object)StripViewAlignment.Right);
             itemsParent.SetBorderAndFillOrientation(PageViewContentOrientation.Horizontal180, false);
         }
         else
         {
             int num = (int)this.SetDefaultValueOverride(RadPageViewStripElement.StripAlignmentProperty, (object)StripViewAlignment.Left);
             itemsParent.SetBorderAndFillOrientation(PageViewContentOrientation.Horizontal, false);
         }
     }
     else
     {
         if (e.Property != RadPageViewNavigationViewElement.CollapsedPaneWidthProperty)
         {
             return;
         }
         this.EnsureDisplayMode(this.DisplayMode);
     }
 }
Esempio n. 2
0
        private void DisplayItemListMenu(RadPageViewStripElement view)
        {
            RadPageViewElementBase   itemListButton = (RadPageViewElementBase)this.buttonsPanel.ItemListButton;
            HorizontalPopupAlignment hAlign         = this.RightToLeft ? HorizontalPopupAlignment.RightToRight : HorizontalPopupAlignment.LeftToLeft;
            VerticalPopupAlignment   vAlign         = VerticalPopupAlignment.TopToBottom;

            switch (view.StripAlignment)
            {
            case StripViewAlignment.Right:
                hAlign = HorizontalPopupAlignment.RightToLeft;
                vAlign = VerticalPopupAlignment.TopToTop;
                break;

            case StripViewAlignment.Left:
                hAlign = HorizontalPopupAlignment.LeftToRight;
                vAlign = VerticalPopupAlignment.TopToTop;
                break;
            }
            view.DisplayItemListMenu(itemListButton, hAlign, vAlign);
        }
Esempio n. 3
0
        protected internal virtual void SetContentOrientation(PageViewContentOrientation orientation, bool recursive)
        {
            if (this.contentOrientation != orientation)
            {
                this.contentOrientation = orientation;
                this.FillPrimitiveImpl.InvalidateFillCache(RadPageViewElement.ItemContentOrientationProperty);
                this.InvalidateMeasure();
            }

            if (recursive)
            {
                foreach (RadElement child in this.Children)
                {
                    RadPageViewElementBase pageElement = child as RadPageViewElementBase;
                    if (pageElement != null)
                    {
                        pageElement.SetContentOrientation(orientation, recursive);
                    }
                }
            }
        }
Esempio n. 4
0
        /// <summary>
        /// Displays the item list menu, using the provided element as menu's owner and the specified horizontal and vertical alignment.
        /// </summary>
        /// <param name="menuOwner"></param>
        /// <param name="hAlign"></param>
        /// <param name="vAlign"></param>
        public void DisplayItemListMenu(RadPageViewElementBase menuOwner, HorizontalPopupAlignment hAlign, VerticalPopupAlignment vAlign)
        {
            if (this.ElementState != ElementState.Loaded)
            {
                return;
            }
            if (this.itemListMenu.DropDown.IsDisplayed)
            {
                this.itemListMenu.DropDown.ClosePopup(RadPopupCloseReason.CloseCalled);
            }

            List <RadMenuItemBase> menuItems = new List <RadMenuItemBase>();

            foreach (RadPageViewItem item in this.items)
            {
                if (item.Visibility == ElementVisibility.Collapsed)
                {
                    continue;
                }

                RadMenuItem menuItem = new RadMenuItem(item.Text);
                menuItem.Image  = item.Image;
                menuItem.Click += this.OnItemListMenuItem_Click;
                menuItem.Tag    = item;
                if (item == this.selectedItem)
                {
                    menuItem.IsChecked = true;
                }

                menuItems.Add(menuItem);
            }

            Rectangle alignRect = this.ElementTree.Control.RectangleToScreen(menuOwner.ControlBoundingRectangle);
            RadPageViewMenuDisplayingEventArgs e = new RadPageViewMenuDisplayingEventArgs(menuItems, alignRect, hAlign, vAlign);

            this.DisplayItemListMenu(e);
        }
Esempio n. 5
0
 /// <summary>
 /// Displays the item list menu, using the provided element as menu's owner.
 /// </summary>
 /// <param name="menuOwner"></param>
 public void DisplayItemListMenu(RadPageViewElementBase menuOwner)
 {
     this.DisplayItemListMenu(menuOwner, HorizontalPopupAlignment.LeftToLeft, VerticalPopupAlignment.TopToBottom);
 }