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;
}
}
To reproduce: - Drop RadMarkupDialog on the form - In code set its DefaultFont and show it WORKAROUND: Create an instance of RadMarkupDialog prior showing it, not at design time.
Description: LostFocus event for the RadDropDownList fires after PopupClosed and before SelectedIndexChanging events no matter that the user have not leave the control yet. To reproduce: - add a RadDropDownList with items - subscribe for the LostFocus event - open the drop down list and close it: the LostFocus event fires Workaround: Use RadDropDownList Leave event: this.radDropDownList1.Leave += radDropDownList1_Leave;
To reproduce:
- Add pie chart and drop down list with some items to a form.
- Then use the following code:
Private Sub RadForm1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Dim series As New PieSeries
series.DataPoints.Add(New PieDataPoint(50, "test"))
series.DataPoints.Add(New PieDataPoint(50, "test2"))
series.ShowLabels = True
RadChartView1.Series.Add(series)
TryCast(RadChartView1.Series(0).Children(0), PiePointElement).BackColor = Color.Red
TryCast(RadChartView1.Series(0).Children(1), PiePointElement).BackColor = Color.Blue
End Sub
Private Sub RadChartView1_LabelFormatting(sender As Object, e As ChartViewLabelFormattingEventArgs) Handles RadChartView1.LabelFormatting
e.LabelElement.Shape = New OfficeShape(True)
End Sub
Workaround:
e.LabelElement.SuspendPropertyNotifications()
e.LabelElement.Shape = New OfficeShape(True)
e.LabelElement.ResumePropertyNotifications()
Create a custom theme starting from Aqua theme. Change the Font for RadLabelElement-TextPrimitive to "Microsoft Sans Serif, 10pt". Save the theme and apply it to the entire application. Show several times a RadMessageBox with long text. The first time the RadMessageBox is sized correcly to its content. Each next showing, cuts off the text.
Workaround: the possible workaround that I can suggest is to dispose the RadMessageBox instance after showing it:
Private Sub RadButton1_Click(sender As Object, e As EventArgs) Handles RadButton1.Click
RadMessageBox.Show(Me, "If you have some veeeeery long sample text, the messagebox " & _
"should be resized according to its content.", "Caption", MessageBoxButtons.OK, My.Resources.image)
RadMessageBox.Instance.Dispose()
End Sub
To reproduce: - Add three line series and only set their point size. - At runtime remove the second series. - The points color is not updated corectly. Workaround - Set colors in code like this: lineSerie1.BorderColor = Color.Red; lineSerie1.BackColor = Color.Red; lineSerie2.BackColor = Color.Green; lineSerie2.BorderColor = Color.Green; lineSerie3.BackColor = Color.Blue; lineSerie3.BorderColor = Color.Blue;
Please refer to the attached screenshot.
To reproduce:
public RadForm1()
{
InitializeComponent();
Font f = new Font("Microsoft Sans Serif", 9.5f);
this.radDropDownList1.DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDownList;
this.radDropDownList1.Font = f;
this.radDropDownList2.DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDown;
this.radDropDownList2.Font = f;
}
Workaround: If the text is not completely visible in RadDropDownList for a specific font you can increase the minimum height of the RadDropDownList and the DropDownListElement.TextBox.TextBoxItem.TextBoxControl.
public RadForm1()
{
InitializeComponent();
this.radDropDownList1.MinimumSize = new Size(0, 25);
this.radDropDownList1.DropDownListElement.TextBox.TextBoxItem.TextBoxControl.MinimumSize = new Size(0, 25);
}
To reproduce:
- Try to set the alignment:
radPopupEditor1.PopupEditorElement.PopupContainerForm.HorizontalPopupAlignment = HorizontalPopupAlignment.RightToRight;
radPopupEditor1.Popup.HorizontalPopupAlignment = HorizontalPopupAlignment.RightToRight;
- The property is reset when the popup is opened.
Workaround:
void radPopupEditor1_PopupOpening(object sender, CancelEventArgs e)
{
RadPopupOpeningEventArgs args = e as RadPopupOpeningEventArgs;
int width = radPopupContainer1.Width;
args.CustomLocation = new Point(args.CustomLocation.X - width + radPopupEditor1.Width, args.CustomLocation.Y);
}
If you try to style the Right column menu of RadApplicationMenu, your changes will not be persisted and applied to the control. Workaround: FillPrimitive fill = (FillPrimitive)this.radRibbonBar1.RibbonBarElement.ApplicationButtonElement.DropDownMenu.RootElement.Children[0].Children[0].Children[2].Children[0].Children[2].Children[1].Children[0]; fill.BackColor = Color.Orange; fill.BackColor2 = Color.Red;
To reproduce:
public Form1()
{
InitializeComponent();
this.radPropertyGrid1.SelectedObject = this;
this.radPropertyGrid1.ContextMenuOpening += radPropertyGrid1_ContextMenuOpening;
}
private void radPropertyGrid1_ContextMenuOpening(object sender, Telerik.WinControls.UI.PropertyGridContextMenuOpeningEventArgs e)
{
foreach (RadItem item in e.Menu.Items)
{
if (item.Text == "Sort")
{
item.Visibility = ElementVisibility.Collapsed;
item.PropertyChanged += item_PropertyChanged;
}
}
}
Workaround:
private void radPropertyGrid1_ContextMenuOpening(object sender, Telerik.WinControls.UI.PropertyGridContextMenuOpeningEventArgs e)
{
RadItem item = null;
for (int i = 0; i < e.Menu.Items.Count; i++)
{
item = e.Menu.Items[i];
if (item.Text=="Sort")
{
e.Menu.Items.Remove(item);
}
}
}
To reproduce:
CultureInfo culture = new CultureInfo("en-US");
culture.DateTimeFormat.FirstDayOfWeek = DayOfWeek.Monday;
culture.DateTimeFormat.CalendarWeekRule = CalendarWeekRule.FirstFourDayWeek;
this.radCalendar1.ShowRowHeaders = true;
this.radCalendar1.Culture = culture;
Text is clipped on the right when line numbers are hidden and word wrap is disabled.
In Microsoft Word, the drag-and-drop functionality for Structured Document Tags (Content Controls) allows users to reposition an entire content control and all its contents within the document using the mouse.
What it does
When a user selects the boundary/frame of a content control rather than the text inside it:
Typical workflow
Common use cases
Important limitations
The behavior may be restricted when:
Word allows users to treat a content control as a movable document object, enabling the entire SDT and its contents to be repositioned via drag-and-drop while preserving the control's structure and properties.
In this particular case, setting the IsAIEnabled property to false does not hide the PromptInput element in the following themes:
- Aqua
- Desert
- HighContrastBlack
- Office2007Black
- Office2010Silver
- Windows7
As a workaround, the PromptInput element can be removed by setting its visibility property to Collapsed:
gridView1.GridViewElement.PromptInputElement.Visibility = ElementVisibility.Collapsed;