To reproduce: please refer to the attached sample project and follow the illustarted steps in the attached gif file.
Steps to reproduce: 1. Set the main screen on 125-percent scale 2. Run attached sample application (1107416 RadPageView Issue.zip). 3. Click menu item "ShowPageView". After showing the page view in a DocumentWindow, the SelectedPageChanging/SelectedPageChanged events are fired twice. Workaround: Replace RadPageView with custom one: public class CustomPageView : RadPageView { protected override void ScaleControl(SizeF factor, BoundsSpecified specified) { this.SuspendEvents(); base.ScaleControl(factor, specified); this.ResumeEvents(); } }
How to reproduce: check the attached project: Workaround: when the form is opened in the designer make sure that all pages are made visible at least ones so the controls are initialized, before attempting to access collection editors via properties window
Currently the pages are wrapped around, i.e. when one reaches the last pages and select next using the down arrow key the first page gets selected Workaround: Public Class MyRadPageView Inherits RadPageView Public Overrides Property ThemeClassName As String Get Return GetType(RadPageView).FullName End Get Set(value As String) MyBase.ThemeClassName = value End Set End Property Protected Overrides Function CreateUI() As RadPageViewElement Select Case Me.ViewMode Case PageViewMode.Stack Return New RadPageViewStackElement() Case PageViewMode.Outlook Return New RadPageViewOutlookElement() Case PageViewMode.ExplorerBar Return New RadPageViewExplorerBarElement() Case PageViewMode.Backstage Return New MyRadPageViewBackstageElement() Case Else Return New RadPageViewStripElement() End Select End Function End Class Public Class MyRadPageViewBackstageElement Inherits RadPageViewBackstageElement Protected Overrides ReadOnly Property ThemeEffectiveType() As Type Get Return GetType(RadPageViewBackstageElement) End Get End Property Protected Overrides Function SelectNextItemCore(current As RadPageViewItem, forward As Boolean, wrap As Boolean) As Boolean Return MyBase.SelectNextItemCore(current, forward, False) End Function Protected Overrides Sub ProcessKeyDown(e As KeyEventArgs) If Me.IsNextKey(e.KeyCode) AndAlso Not Me.IsEditing Then Me.SelectNextItem() ElseIf Me.IsPreviousKey(e.KeyCode) AndAlso Not Me.IsEditing Then Me.SelectPreviousItem() ElseIf e.KeyCode = Keys.Home AndAlso Not Me.IsEditing Then Me.Owner.SelectedPage = Nothing Me.SetSelectedItem(Me.Items.First()) ElseIf e.KeyCode = Keys.End AndAlso Not Me.IsEditing Then Me.Owner.SelectedPage = Nothing Me.SetSelectedItem(Me.Items.Last()) ElseIf e.KeyCode = Keys.F2 Then BeginEdit() ElseIf e.KeyCode = Keys.Escape Then CancelEdit() ElseIf e.KeyCode = Keys.Enter AndAlso Me.IsEditing AndAlso Me.ActiveEditor.Validate() Then EndEdit() End If End Sub End Class
To reproduce: use the following code snippet: public RadForm1() { InitializeComponent(); this.radPageView1.Pages.Add(new RadPageViewPage("My page")); RadPageViewStripElement stripElement = this.radPageView1.ViewElement as RadPageViewStripElement; stripElement.StripButtons = StripViewButtons.ItemList; this.radPageView1.ItemListMenuDisplaying += radPageView1_ItemListMenuDisplaying; } private void radPageView1_ItemListMenuDisplaying(object sender, RadPageViewMenuDisplayingEventArgs e) { e.Items.Clear(); RadMenuItem item = new RadMenuItem("aaa"); e.Items.Add(item); } Click the overflow button to open the drop down and select the item. When you open the overflow popup again you will notice that the item is duplicated although you clear the items in the ItemListMenuDisplaying event. Workaround: dispose the item when it is clicked private void radPageView1_ItemListMenuDisplaying(object sender, RadPageViewMenuDisplayingEventArgs e) { e.Items.Clear(); RadMenuItem item = new RadMenuItem("aaa"); item.Click += item_Click; e.Items.Add(item); } private void item_Click(object sender, EventArgs e) { RadMenuItem item = sender as RadMenuItem; if (item != null) { item.Click -= item_Click; item.Dispose(); } }
To reproduce: for (int i = 0; i < 20; i++) { this.radPageView1.Pages.Add(new RadPageViewPage("Page" + i)); } this.radPageView1.ViewMode = PageViewMode.Backstage; Only a few of the pages are visible and the user is not allowed to scroll to see the rest of them. Workaround: 1. Make use of the strip buttons: RadPageViewBackstageElement el = this.radPageView1.ViewElement as RadPageViewBackstageElement; el.ItemContainer.ButtonsPanel.Visibility = ElementVisibility.Visible; 2. Place the control in RadScrollablePanel RadScrollablePanel scrollablePanel = new RadScrollablePanel(); scrollablePanel.Dock = DockStyle.Fill; this.Controls.Add(scrollablePanel); RadPageView pageView = new RadPageView(); pageView.ViewMode = PageViewMode.Backstage; scrollablePanel.Controls.Add(pageView); for (int i = 0; i < 50; i++) { pageView.Pages.Add(new RadPageViewPage("Page " + i.ToString())); } pageView.Size = new System.Drawing.Size(1000,2500);
To reproduce: 1. Add a RadPageView with several pages. 2. Disabled some of the pages. 3. When running the application, try to navigate through pages with the arrow keys. You will notice that the disabled pages are also selected. Workaround: public class CustomPageView : RadPageView { public override string ThemeClassName { get { return typeof(RadPageView).FullName; } } protected override RadPageViewElement CreateUI() { if (this.ViewMode == PageViewMode.Strip) { return new CustomViewElement(); } return base.CreateUI(); } } public class CustomViewElement : RadPageViewStripElement { protected override Type ThemeEffectiveType { get { return typeof(RadPageViewStripElement); } } protected override bool CanSelectItem(RadPageViewItem item) { bool result= base.CanSelectItem(item); return result && item.Enabled; } }
To reproduce: - Add a RadPageView with several pages to a form. - View the tabs by setting the SelectedTab property. - Create a form instance and show it with the ShowDialog method. - Select the second tab. - Reopen the form and select a tab after the second. You will notice that the content is not changed. Workaround: Create a new instance each time when the form is shown.
To reproduce: 1. Drag and drop RadPageView on the form 2. Select the control and open a smart tag 3. You will see that the 'Dock in parent container' option is not added
Hello, PageView with Windows8 Theme, ViewMode Stack, Stack Position Left Tabs are drawn incorrectly, see attachment. can i work around this issue? Thanks
Workaround: instead of removing and adding the page, modify its Visibility property
To reproduce: - Add RadPageView change the view to ExplorerBar and add some pages with controls. - Start the application expand all pages and scroll. Workaround: class MyPageView : RadPageView { protected override RadPageViewElement CreateUI() { if (this.ViewMode == PageViewMode.ExplorerBar) { return new MyExplorerBarElement(); } return base.CreateUI(); } } class MyExplorerBarElement : RadPageViewExplorerBarElement { protected override bool IsChildElementExternal(Telerik.WinControls.RadElement element) { return !(element is RadPageViewElementBase) && base.IsChildElementExternal(element); } protected override Type ThemeEffectiveType { get { return typeof(RadPageViewExplorerBarElement); } } }
To reproduce: - Add RadpageView to a form and build the application. - Merge the assemblies with .NET Reactor - Run the new exe file.
To reproduce: - Add PageView to a form and set its Dock property to fill. - Add single page and set its AutoScroll property to true. - Add some controls and make sure that a scrollbar will appear. - Start the application and scroll to the bottom. - Maximize the form. You will notice that the scrollbar position is wrong. Workaround: protected override void WndProc(ref Message m) { if (m.Msg == 0x0112) { if (m.WParam == new IntPtr(0xF030)) { this.radPageView1.SelectedPage.AutoScrollPosition = this.radPageView1.AutoScrollPosition; } } base.WndProc(ref m); }
Workaround: RadPageViewExplorerBarElement exElement = radPageView2.ViewElement as RadPageViewExplorerBarElement; exElement.ItemSize = new Size(200, 100);