To reproduce: var stackPanel = new StackLayoutElement { Orientation = Orientation.Vertical }; stackPanel.Children.Add(new TextPrimitive { Text = "Demo" }); stackPanel.Children.Add(new TextPrimitive { Text = "Demo" }); Panel.PanelElement.Children.Add(stackPanel); Panel.AutoSize = true; // <= false works fine Workaund: - Put the panel in a control: public class MyControl : RadControl { protected override void CreateChildItems(RadElement parent) { base.CreateChildItems(parent); var stackPanel = new StackLayoutElement { Orientation = Orientation.Vertical }; stackPanel.Children.Add(new TextPrimitive { Text = "Demo" }); stackPanel.Children.Add(new TextPrimitive { Text = "Demo" }); parent.Children.Add(stackPanel); } protected override RootRadElement CreateRootElement() { RootRadElement root = base.CreateRootElement(); root.BackColor = Color.Transparent; return root; } }
To reproduce: please refer to the attached gif file: 1. Drop RadCollapsiblePanel from the toolbox on to the windows form. 2. Click on the form and press Ctrl+Z to undo the change 3. Observe that an error dialog popped up saying "Index and length must refer to a location within the string. Parameter name: length"
Use attached to reproduce. Workaround: - Use RadForm it explicitly handles the controls scaling. - Make sure that the following of the user controls are set like this: this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
If you set this.radScrollablePanel1.PanelContainer.VerticalScroll.Value = 170, the content will be scrolled, but the position of the scrollbar thumb will not be changed. You should call ((RadVScrollBar)this.radScrollablePanel1.Controls[1]).Value = 170 explicitly. However, this should happen automatically. Resolution: The .NET framework does not provide a way to get notified when the values of the PanelContainer's scrolls have changed. To set the values programmatically use: this.radScrollablePanel1.VerticalScrollbar.Value = value;this.radScrollablePanel1.HorizontalScrollbar.Value = value;
When you set ImageKey or ImageIndex the Image property is not set.
When RadPanel is set to AutoSize, it should update its size automatically when changing the visibility of some control inside it. Workaround: public class CustomRadPanel : RadPanel { public override string ThemeClassName { get { return typeof(RadPanel).FullName; } set { base.ThemeClassName = value; } } protected override void OnLayout(LayoutEventArgs e) { base.OnLayout(e); int maxHeight = 0; foreach (Control control in this.Controls) { if (control.Visible) { maxHeight = Math.Max(control.Height, maxHeight); } } this.AutoSize = false; this.Height = maxHeight; } }
1. Add RadPanel on to design time surface 2. Set its AutoScroll property to true 3. Add button which is partially visible 4. Try to scroll using the scrollbar Resolution: You need to use RadScrollablePanel instead RadPanel. You can refer to link http://feedback.telerik.com/Project/154/Feedback/Details/109764-add-scrolling-behavior-for-radscrollablepanel-at-design-time
If I add a RadLabel to a RadPanel, and set the panel AutoScroll to true, scrolling the panel will cause lines to appear. The words get clipped.
When I have a control in the RadCollapsiblePanel(RCP) and copy and paste it into the same RCP, it give the control the exact same name. Then I have two conrols on my form with the same name which causes issues. Someone should look into this. I tried to repeat it in two different solution and could do it.
To reproduce: Add a RadLabel with text, set its background to red, its border to Yellow and start the project. You will notice that there is one pixel outside the border. Workaround: Set the Borderthickness of the LabelElement to 0: label2.LabelElement.BorderThickness = new Padding(0);
To reproduce: Add a RadCollapsiblePanel and a few controls inside, such as 1-2 buttons and a RadRichTextBox. Align their Y and Width. Anchor them to Top, Left, Right. When you start the form you will see that their width will increase. You can also try with the attached project Workaround: Create the following custom RadCollapsiblePanel and use it instead: public class MyCollapsiblePanel : RadCollapsiblePanel { private MyCollapsiblePanelControlsContainer panelContainer; public new CollapsiblePanelPanelContainer PanelContainer { get { return this.panelContainer.PanelContainer; } } protected override CollapsiblePanelControlsContainer CreateControlsContainer() { this.panelContainer = new MyCollapsiblePanelControlsContainer(); return this.panelContainer; } public override string ThemeClassName { get { return typeof(RadCollapsiblePanel).FullName; } set { } } } public class MyCollapsiblePanelControlsContainer : CollapsiblePanelControlsContainer { public new CollapsiblePanelPanelContainer PanelContainer { get; set; } protected override RadScrollablePanelContainer CreateScrollablePanelContainer() { this.PanelContainer = new CollapsiblePanelPanelContainer(this); return this.PanelContainer; } } public class CollapsiblePanelPanelContainer : RadScrollablePanelContainer { public CollapsiblePanelPanelContainer(RadScrollablePanel parentPanel) : base(parentPanel) { } public new Size Size { get { return base.Size; } set { base.Size = value; RadCollapsiblePanel cp = this.FindCollapsiblePanelParent(); if (cp != null && cp.IsInitializing) { cp.ControlsContainer.Size = value; } } } protected virtual RadCollapsiblePanel FindCollapsiblePanelParent() { Control parent = this.Parent; do { if (parent is RadCollapsiblePanel) { return parent as RadCollapsiblePanel; } parent = parent.Parent; } while (parent != null); return null; } }
To reproduce: Add a RadCollapsiblePanel to a form and anchor it to top left and right. Start the application, collapse the panel and resize the form to the right. Expand the panel and you will see that the width is incorrect. Workaround: Use the following code, call the CollapsbilePanelAnchorFix to recursively find all CollapsiblePanels and subscribe to the event which fixes the issue: public RadForm1() { InitializeComponent(); this.CollapsiblePanelAnchorFix(this); }  public void CollapsiblePanelAnchorFix(Control parent) { foreach (Control ctrl in parent.Controls) { if (ctrl is RadCollapsiblePanel) { ctrl.SizeChanged += radCollapsiblePanel1_SizeChanged; } this.CollapsiblePanelAnchorFix(ctrl); } }  void radCollapsiblePanel1_SizeChanged(object sender, EventArgs e) { RadCollapsiblePanel panel = sender as RadCollapsiblePanel; if (!panel.IsExpanded) { if (panel.ExpandDirection == Telerik.WinControls.UI.RadDirection.Up || panel.ExpandDirection == Telerik.WinControls.UI.RadDirection.Down) { panel.OwnerBoundsCache = new Rectangle(panel.Location, new Size(panel.Bounds.Width, panel.OwnerBoundsCache.Height)); } else { panel.OwnerBoundsCache = new Rectangle(panel.Location, new Size(panel.OwnerBoundsCache.Width, panel.Bounds.Height)); } } }
To reproduce: Add a RadScrollablePanel and a button at a location of 500, 1000. Start the app and click the panel(not the button) you will see that you cannot scroll the panel. Workaround: Subscribe to the MouseWheel event of RadScrollablePanel: void RadScrollablePanel_MouseWheel(object sender, MouseEventArgs e) { typeof(Control).GetMethod("OnMouseWheel", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic).Invoke(scrollablePanel.PanelContainer, new object[] { e }); }
How to reproduce: CollapsiblePanelHeaderElement headerElement = this.radCollapsiblePanel1.CollapsiblePanelElement.HeaderElement; RadTextBoxElement txtBox = new RadTextBoxElement(); headerElement.Children.Add(txtBox); Workaround: use RadTextBoxControlElement
To reproduce: - Add a collapsible panel to ToolWindow. - Collapse the panel and redock the tool window. - The panel cannot be expanded any more. Workaround: List<Rectangle> list; void radDock1_DockStateChanging(object sender, Telerik.WinControls.UI.Docking.DockStateChangingEventArgs e) { list = new List<Rectangle>(); foreach (var item in e.NewWindow.Controls) { if (item is RadCollapsiblePanel) { list.Add(((RadCollapsiblePanel)item).OwnerBoundsCache); } } } void radDock1_DockStateChanged(object sender, Telerik.WinControls.UI.Docking.DockWindowEventArgs e) { int count = 0; foreach (var item in e.DockWindow.Controls) { if (item is RadCollapsiblePanel) { ((RadCollapsiblePanel)item).OwnerBoundsCache = list[count++]; } } }
How to reproduce: this.radScrollablePanel1.PanelElement.BorderThickness = new Padding(0); Workaround: in order to hide the border of the RadScrollablePanel.PanelElement its Visiblity needs to be set to Hidden or Collapsed this.radScrollablePanel1.PanelElement.Border.Visibility = Telerik.WinControls.ElementVisibility.Hidden;
Sometimes when custom theme is used exception is thrown. Workaround: Switch to control default before switching to custom theme.
If you add a RadCollapsiblePanel to a form in design time, then add some child controls in its control container, then open the Document Outline window, you will see that the child controls are not visible in the Document Outline. Workaround: There is a workaround which involves creating an inherited RadCollapsiblePanel and assigning it with a custom designer: [Designer(typeof(MyCollapsiblePanelDesigner))] class MyCollapsiblePanel : RadCollapsiblePanel { public override string ThemeClassName { get { return typeof(RadCollapsiblePanel).FullName; } set { base.ThemeClassName = value; } } } class MyCollapsiblePanelDesigner : RadControlDesignerLite { public override void Initialize(System.ComponentModel.IComponent component) { base.Initialize(component); this.EnableDesignMode((this.Control as RadCollapsiblePanel).ControlsContainer, "ControlsContainer"); this.EnableDesignMode((this.Control as RadCollapsiblePanel).PanelContainer, "PanelContainer"); } public override ControlDesigner InternalControlDesigner(int internalControlIndex) { return this.DesignerHost.GetDesigner((this.Component as RadCollapsiblePanel).PanelContainer) as ControlDesigner; } public override int NumberOfInternalControlDesigners() { return 1; } protected override RadControlDesignerLiteActionList CreateActionList() { return new RadCollapsiblePanelActionList(this); } } Note that you would need to add references to the System.Design and Telerik.WinControls.UI.Design assemblies in order for the workaround to build. After you build it successfully, you can use the MyCollapsiblePanel component from your toolbox and you will be able to see the child controls in the document outline.
Please refer to the atatched sample project and screenshot. Workaround: You can manipulate the text by inserting new lines in order to simulate the desired wrapping functionality when the auto ellipsis functionality is enabled.