Controls in RadPanel redraw slowly when changing the Enabled state of the panel. Workaround: private void radButton1_Click(object sender, EventArgs e) { if (this.radPanel1.Enabled) { this.radPanel1.Enabled = false; } else { this.radPanel1.Visible = false; this.radPanel1.Enabled = true; this.radPanel1.Visible = true; } }
RadPanel, RadScrollablePanel and RadGroupBox should support AutoSize mode, where AutoSize = true and AutoSizeMode = GrowAndShrink.
Workaround: set UseCompatibleTextRendering to true.
Check the AutoSize property behavior at design time for Label and RadLabel.
To reproduce: - Set the Localizable property of the form to true. - Change the header text of the collapsible panel.
To reproduce: add a RadCollapsiblePanel and insert several controls at run time with specifying the location and size of the inner controls. Set the ContentSizingMode property to CollapsiblePanelContentSizingMode.FitToContentHeight | CollapsiblePanelContentSizingMode.FitToContentWidth. When you run the application you will notice that the inner controls are cut off and the panel is not resized according to its content.
Workaround:
Before:
After:
public RadForm2()
{
InitializeComponent();
this.radCollapsiblePanel1.ContentSizingMode = CollapsiblePanelContentSizingMode.None;
}
private void RadForm2_Load(object sender, EventArgs e)
{
SizeF fillElementSize = this.radCollapsiblePanel1.Size;
int maxY = int.MinValue;
int maxX = int.MinValue;
int maxControlWidth = int.MinValue;
int maxControlHeight = int.MinValue;
bool fitToHeight = true;
bool fitToWidth = true;
Padding panelContainerPadding = this.radCollapsiblePanel1.ControlsContainer.PanelContainer.Padding;
foreach (Control control in this.radCollapsiblePanel1.ControlsContainer.PanelContainer.Controls)
{
if (fitToHeight)
{
maxY = Math.Max(maxY, control.Bounds.Location.Y + control.Bounds.Size.Height + control.Margin.Bottom + panelContainerPadding.Bottom +
this.radCollapsiblePanel1.ControlsContainer.VerticalScrollbar.Value);
maxControlWidth = Math.Max(maxControlWidth, control.Width);
}
if (fitToWidth)
{
maxX = Math.Max(maxX, control.Bounds.Location.X + control.Bounds.Size.Width + control.Margin.Right + panelContainerPadding.Right +
this.radCollapsiblePanel1.ControlsContainer.HorizontalScrollbar.Value);
maxControlHeight = Math.Max(maxControlHeight, control.Height);
}
}
if (fitToHeight)
{
bool horizontalScrollbarNeeded = fillElementSize.Width <= maxY + maxControlWidth;
if (horizontalScrollbarNeeded)
{
this.radCollapsiblePanel1.ControlsContainer.HorizontalScrollBarState = ScrollState.AlwaysHide;
}
else
{
this.radCollapsiblePanel1.ControlsContainer.HorizontalScrollBarState = ScrollState.AutoHide;
}
fillElementSize.Height = maxY;
}
if (fitToWidth)
{
bool verticalScrollbarNeeded = fillElementSize.Height <= maxX + maxControlHeight;
if (verticalScrollbarNeeded)
{
this.radCollapsiblePanel1.ControlsContainer.VerticalScrollBarState = ScrollState.AlwaysHide;
}
else
{
this.radCollapsiblePanel1.ControlsContainer.VerticalScrollBarState = ScrollState.AutoHide;
}
fillElementSize.Width = maxX;
}
fillElementSize.Height += this.radCollapsiblePanel1.CollapsiblePanelElement.HeaderElement.Size.Height + 5;
this.radCollapsiblePanel1.MinimumSize = this.radCollapsiblePanel1.MaximumSize = this.radCollapsiblePanel1.Size = fillElementSize.ToSize();
}
To reproduce: - Use the attached project. - Resize the panel to the left. - You will notice that the borders are cut off. Second scenario: refer to the 1016234GridInCollapsiblePanelVS2010.zip RadCollapsiblePanel1.ExpandDirection = Telerik.WinControls.UI.RadDirection.Right RadSplitContainer1.SplitPanels("SplitPanel2").SizeInfo.SizeMode = Telerik.WinControls.UI.Docking.SplitPanelSizeMode.Absolute RadSplitContainer1.SplitPanels("SplitPanel2").SizeInfo.AbsoluteSize = New System.Drawing.Size(637, 522) Workaround: manually update the collapsible panel`s size in the SplitterMoved event public WorkCenterScheduleAndStatusControl() { InitializeComponent(); this.radSplitContainer1.SplitterMoved += RadSplitContainer1_SplitterMoved; } private void RadSplitContainer1_SplitterMoved(object sender, SplitterEventArgs e) { this.radCollapsiblePanel1.Size = new Size(this.radCollapsiblePanel1.Size.Width, this.radCollapsiblePanel1.Size.Height - 1); this.radCollapsiblePanel1.Size = new Size(this.radCollapsiblePanel1.Width, this.radCollapsiblePanel1.Size.Height + 1); }
Steps to reproduce: 1) Add RadScrollablePanel 2) Add RadTextBox control into the RadScrollablePanel 3) Set the RightToLeft property of the to RadScrollablePanel to Yes 4) Set the following properties of the RadTextBox: this.radTextBox1.AutoSize = false; this.radTextBox1.Multiline = true; Expected Result: The horizontal scrollbar is working properly Actual Result: The horizontal scrollbar of the RadScrollablePanel is showing but is not working
How to reproduce: check the attached video Workaround: use the attached custom theme
FIX. RadLabel - size goes to 0,0 after setting AutoSize to false on a newly added label to the form
How to reproduce: check the attached project Workaround: resize the size of the hosting RadPanel private void radCollapsiblePanel_Expanding(object sender, CancelEventArgs e) { this.radPanel1.Size = new Size(this.radPanel1.Size.Width, this.radPanel1.Size.Height - 1); } private void radCollapsiblePanel_Expanded(object sender, EventArgs e) { this.radPanel1.Size = new Size(this.radPanel1.Size.Width, this.radPanel1.Size.Height + 1); }
To reproduce: 1. Add a RadSplitContainer with two split panels. 2. Add a RadCollapsiblePanel to the left split panel and set the RadCollapsiblePanel.Dock property to Fill. 3. Add a RadGridView inside the RadCollapsiblePanel and set the RadGridView.Dock property to Fill. 4. Populate the grid with data. 5. Run the application and move the splitter to increase the RadCollapsiblePanel's size. The RadGridView is resized correctly. 6. Move the splitter to shrink the RadCollapsiblePanel. As a result the grid is not resized correctly. Workaround: Subscribe to the RadSplitContainer.SplitterMoved event and use the following code: this.RadCollapsiblePanel1.EnableAnimation = false; this.RadCollapsiblePanel1.IsExpanded = !this.RadCollapsiblePanel1.IsExpanded; this.RadCollapsiblePanel1.IsExpanded = !this.RadCollapsiblePanel1.IsExpanded; this.RadCollapsiblePanel1.EnableAnimation = true;
Code to reproduce: this.radLabel1.BackColor = Color.Yellow; this.radLabel1.BorderVisible = true; this.radLabel1.LabelElement.LabelBorder.ForeColor = Color.Red; WORKAROUND: this.radLabel1.LabelElement.LabelBorder.FitToSizeMode = RadFitToSizeMode.FitToParentBounds;
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;
When AutoSize is false, TextWrap is true, TextImageRelation is ImageBeforeText and RadLabel has a padding set, the text does not wrap correctly.
Description: For a RadScrollablePanel (VerticalScrollbar is visible) with a RadSpinEditor inside it, when the user is scrolling the mouse wheel in order to change the RadSpinEditor value, both controls (the RadScrollablePanel and the RadSpinEditor) are affected. To reproduce: - add a RadScrollablePanel with several controls inside it (VerticalScrollbar is visible) - add a RadSpinEditor inside the RadScrollablePanel - scroll the mouse wheel in order to change the RadSpinEditor value Workaround: this.radSpinEditor3.SpinElement.TextBoxItem.HostedControl.MouseWheel+= HostedControl_MouseWheel; private void HostedControl_MouseWheel(object sender, MouseEventArgs e) { if (this.radSpinEditor3.ReadOnly || !this.radSpinEditor3.SpinElement.EnableMouseWheel) { return; } HandledMouseEventArgs handledMouseEventArg = e as HandledMouseEventArgs; if (handledMouseEventArg != null) { if (handledMouseEventArg.Handled) { return; } handledMouseEventArg.Handled = true; } }
When RadPanel gets focus it prevents Microsoft Windows Form key events from being fires unless the form KeyPreview property is enabled.
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"
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; } }
When the control is anchored to bottom left and its text is set to empty string in the form's Load event its position is changed. To workaround this you can either set the text to a space or you can set the text in the form's shown event: Private Sub Form1_Shown(sender As Object, e As EventArgs) Handles MyBase.Shown RadLabel2.Text = "" End Sub