Completed
Last Updated: 28 Sep 2018 07:56 by Dimitar
Workaround:


        public class CustomPageView : RadPageView
        {
            public override string ThemeClassName  
            { 
                get 
                { 
                    return typeof(RadPageView).FullName;  
                }
            }

            protected override RadPageViewElement CreateUI()
            {
                if (this.ViewMode == PageViewMode.NavigationView)
                {
                    return new CustomRadPageViewNavigationViewElement();
                }
                return base.CreateUI();
            }
        }

        public class CustomRadPageViewNavigationViewElement : RadPageViewNavigationViewElement
        {
            protected override Type ThemeEffectiveType     
            { 
                get    
                { 
                    return typeof(RadPageViewNavigationViewElement);     
                }
            }

            public override void Expand()
            {
                if (!this.IsCollapsed)
                {
                    return;
                }

                FieldInfo pi = typeof(RadPageViewNavigationViewElement).GetField("isCollapsed", BindingFlags.NonPublic | BindingFlags.Instance);
                pi.SetValue(this, false); 
                this.ItemContainer.Visibility = ElementVisibility.Visible;

                NavigationViewDisplayModes mode = this.GetEffectiveDisplayMode(this.Size.Width);

                if (mode == NavigationViewDisplayModes.Expanded)
                {
                    
                    this.ItemContainer.MinSize = new Size(this.ExpandedPaneWidth, 0);
                }
                else
                {
                    this.PopupStack.Children.Insert(0, this.HamburgerButton);

                    if (!this.PopupStack.Children.Contains(this.ItemContainer))
                    {
                        this.PopupStack.Children.Add(this.ItemContainer);
                    }

                    this.HamburgerButton.Alignment = this.RightToLeft ? ContentAlignment.TopRight : ContentAlignment.TopLeft;
                    this.HamburgerButton.StretchHorizontally = true;
                    this.ItemContainer.ItemLayout.SetValue(RadPageViewStripElement.StripAlignmentProperty, StripViewAlignment.Right);
                    this.ItemContainer.ResetValue(RadElement.MinSizeProperty, ValueResetFlags.Animation);
                    this.ItemContainer.MinSize = new Size(this.ExpandedPaneWidth, 0);
                    this.ItemContainer.MaxSize = Size.Empty;

                    foreach (RadPageViewItem item in this.Items)
                    {
                        item.DrawText = true;
                    }

                    if (this.Popup.ElementTree.RootElement.ElementState != ElementState.Loaded)
                    {
                        Size size = new Size(this.ExpandedPaneWidth, (int)this.DesiredSize.Height);
                        this.Popup.LoadElementTree(size);
                    }

                    ApplyThemeToPopup(this.ElementTree, this.Popup);

                    this.Popup.Size = new Size(this.ExpandedPaneWidth, (int)this.DesiredSize.Height);
                    this.Popup.DropDownAnimationDirection = this.RightToLeft ? RadDirection.Left : RadDirection.Right;
                    this.Popup.HorizontalPopupAlignment = this.RightToLeft ? HorizontalPopupAlignment.RightToRight : HorizontalPopupAlignment.LeftToLeft;
                    this.Popup.VerticalPopupAlignment = VerticalPopupAlignment.TopToBottom;
                    this.Popup.RootElement.BackColor = this.BackColor;

                    this.Popup.Show(this.PointToScreen(this.RightToLeft ? new Point(this.Bounds.Right, this.Bounds.Top) : new Point(this.Bounds.Left, this.Bounds.Top)));
                }
            }

            public override void Collapse()
            {
                if (this.IsCollapsed)
                {
                    return;
                }
                FieldInfo pi = typeof(RadPageViewNavigationViewElement).GetField("isCollapsed", BindingFlags.NonPublic | BindingFlags.Instance);
                pi.SetValue(this, true); 

                foreach (RadPageViewItem item in this.Items)
                {
                    item.DrawText = false;
                }

                NavigationViewDisplayModes mode = this.GetEffectiveDisplayMode(this.Size.Width);             

                if (mode == NavigationViewDisplayModes.Expanded)
                {
                    this.ItemContainer.MinSize = new Size(this.CollapsedPaneWidth, 0);
                }
                else
                {
                    FieldInfo fi = typeof(RadPageViewNavigationViewElement).GetField("programmaticallyClosingPopup", BindingFlags.NonPublic | BindingFlags.Instance);
                    fi.SetValue(this, true); 
                    this.Popup.ClosePopup(RadPopupCloseReason.Mouse);
                    this.HamburgerButton.StretchHorizontally = false;
                    fi = typeof(RadPageViewNavigationViewElement).GetField("programmaticallyClosingPopup", BindingFlags.NonPublic | BindingFlags.Instance);
                    fi.SetValue(this, false); 

                    if (mode == NavigationViewDisplayModes.Compact)
                    {
                        this.ItemContainer.MinSize = new Size(this.CollapsedPaneWidth, 0);
                        this.ItemContainer.MaxSize = new Size(this.CollapsedPaneWidth, 0);

                        if (!this.Children.Contains(this.ItemContainer))
                        {
                            this.Popup.RootElement.ResetValue(RadItem.BackColorProperty, ValueResetFlags.Local);
                            this.Children.Insert(0, this.ItemContainer);
                        }
                    }

                    if (!this.Children.Contains(this.HamburgerButton))
                    {
                        this.HamburgerButton.ResetValue(AlignmentProperty, ValueResetFlags.Local);
                        this.Children.Add(this.HamburgerButton);
                    }
                }
            }
        }
Completed
Last Updated: 12 Oct 2018 09:29 by Dimitar
When you set the RightToLeft property to Yes, you will obtain incorrect layout. Please refer to the attached gif file.
Completed
Last Updated: 03 Dec 2018 08:33 by Dimitar
To reproduce: add a RadPageView in NavigationView and set the following property:


        Dim view As RadPageViewNavigationViewElement = TryCast(Me.RadPageView1.ViewElement, RadPageViewNavigationViewElement)

        view.CollapsedPaneWidth = 300 

The expected result is that the navigation view default's width is set to 300 when loading. However, it is adjusted when you expand and collapse the hamburger.
Completed
Last Updated: 12 Jun 2020 16:05 by ADMIN
Release R2 2020 SP1

I attached a video and the code I used. I am trying to remove and add pageviews. (I would hide them it i knew how)

When I add the pageview back in while the hamburger menu is closed it somewhat expands the tabs. I would like it to leave it closed

Completed
Last Updated: 07 Jul 2020 08:23 by ADMIN
Release R3 2020 (LIB 2020.2.713)

How to reproduce: 

public Form1()
{
    InitializeComponent();

    this.radPageView1.ItemSizeMode = Telerik.WinControls.UI.PageViewItemSizeMode.EqualSize;
    this.radPageView1.ItemSize = new Size(50, 20);
}

Declined
Last Updated: 03 Nov 2020 11:52 by ADMIN

The layout on a monitor with 100%:

After moving the form to a monitor with higher than 100% DPI scaling, e.g. 175% or greater:

Once you switch to the first page which contains exactly the same UserControl, the layout is not correct:

 

Declined
Last Updated: 30 Nov 2020 14:54 by ADMIN
Created by: Jan
Comments: 1
Category: PageView
Type: Feature Request
0
It would be great if there was also a None (ViewMode) for PageView. That means no tabs and only the container. This is especially useful if you use PageView for Single Page WinForms. Up to now I use to hide the tabs with CodeBehind.
Unplanned
Last Updated: 20 May 2024 14:22 by ADMIN

(this.radPageView1.ViewElement as RadPageViewStripElement).AllowEdit = true;
(this.radPageView1.ViewElement as RadPageViewStripElement).NewItemVisibility = StripViewNewItemVisibility.End;

 

 

Unplanned
Last Updated: 07 Jun 2024 12:53 by ADMIN
In this case, the editing functionality of the control is allowed. When we try to reorder the pages tabs runtime, the editing operation is triggered on the drag page item. 
Completed
Last Updated: 12 Feb 2025 12:43 by ADMIN
Release 2025.1.211 (2025 Q1)
1 2 3 4 5 6