In the Visual Theme Builder (fresh installed Telerik UI for WinForms) you'll get an error because the directory "VbsRecoveryData" seems to be missing. Creating the directory before "package.Compress(path)" fixes this for me.
This width is 6px by default and it doesn't offer convenient API for customizing it:
Please run the attached sample project and navigate with the left/right arrows as it is demonstrated in the gif file.
In this specific scenario, we have a menu with 2 menu items: &File and &Open. The mnemonic sign is set to the F and O letters. In the form, we have a TextBox control which is currently focused. The next step is to press the Alt key while the TextBox is focused. Pressing some other letter, D for example, the letter will be typed in the TextBox. This letter does not exist as a mnemonic, and the RadMenu will ignore it. The RadMenu remains in active mnemonic state.
Expected behavior: Using none mnemonic letter should not be accepted by any other control until this state is closed in the RadMenu.
Hello,
we are trying to use RadPropertyGrid to show the properties of some objects listed in a RadGrdiView.
We use ExpandableObject to expand our custom property, but we have some problems when we try to show the properties of multiple selected items, when the values of the attribute of the property are not the same in all the selected objects. We tried to use PropertyGrid of Winform and we don't have this problem.
Thank you.
Workaround:
public class CustomRadDropDownList : RadDropDownList
{
protected override RadDropDownListElement CreateDropDownListElement()
{
return new CustomRadDropDownListElement();
}
public override string ThemeClassName
{
get
{
return typeof(RadDropDownList).FullName;
}
}
}
public class CustomRadDropDownListElement : RadDropDownListElement
{
protected override RadDropDownListArrowButtonElement CreateArrowButtonElement()
{
return new CustomRadDropDownListArrowButtonElement();
}
protected override Type ThemeEffectiveType
{
get
{
return typeof(RadDropDownListElement);
}
}
}
public class CustomRadDropDownListArrowButtonElement : RadDropDownListArrowButtonElement
{
protected override Type ThemeEffectiveType
{
get
{
return typeof(RadDropDownListArrowButtonElement);
}
}
protected override void OnClick(EventArgs e)
{
MouseEventArgs args = e as MouseEventArgs;
if (args.Button == System.Windows.Forms.MouseButtons.Left)
{
base.OnClick(e);
}
}
}
The issue exists with RadMenuItem as well!
Workaround:
public class CustomCommandBarButton : CommandBarButton
{
protected override void OnClick(EventArgs e)
{
MouseEventArgs args = e as MouseEventArgs;
if (args.Button == System.Windows.Forms.MouseButtons.Left)
{
base.OnClick(e);
}
}
protected override Type ThemeEffectiveType
{
get
{
return typeof(CommandBarButton);
}
}
}
When you focus a RadTextBox you will notice the keyboard button that popups next to the focused control. However, for the RadAutoCompleteBox this keyboard button does not show.
Workaround: show it manually on the GotFocus event and hide it on the LostFocus event
private void radTextBox1_GotFocus(object sender, EventArgs e)
{
string progFiles = @"C:\Program Files\Common Files\Microsoft Shared\ink";
string keyboardPath = Path.Combine(progFiles, "TabTip.exe");
Process.Start(keyboardPath);
}
private void radTextBox1_LostFocus(object sender, EventArgs e)
{
var procs = Process.GetProcessesByName("TabTip");
if (procs.Length != 0)
procs[0].Kill();
}
To reproduce:
private void Form1_Load(object sender, EventArgs e)
{
this.categoriesTableAdapter.Fill(this.nwindDataSet.Categories);
this.radMultiColumnComboBox1.DataSource = this.categoriesBindingSource;
this.radMultiColumnComboBox1.DisplayMember = "CategoryName";
this.radMultiColumnComboBox1.ValueMember = "CategoryID";
this.radMultiColumnComboBox1.EditorControl.EnableFiltering = true;
this.radMultiColumnComboBox1.EditorControl.ShowHeaderCellButtons = true;
}
Workaround:
public Form1()
{
InitializeComponent();
this.radMultiColumnComboBox1.MultiColumnComboBoxElement.PopupClosing += MultiColumnComboBoxElement_PopupClosing;
this.radMultiColumnComboBox1.EditorControl.FilterPopupInitialized += EditorControl_FilterPopupInitialized;
}
private void EditorControl_FilterPopupInitialized(object sender, FilterPopupInitializedEventArgs e)
{
RadListFilterPopup filterPopup = e.FilterPopup as RadListFilterPopup;
if (filterPopup != null)
{
filterPopup.PopupOpened -= filterPopup_PopupOpened;
filterPopup.PopupOpened += filterPopup_PopupOpened;
filterPopup.PopupClosed -= filterPopup_PopupClosed;
filterPopup.PopupClosed += filterPopup_PopupClosed;
}
}
bool shouldCancel = false;
private void filterPopup_PopupClosed(object sender, RadPopupClosedEventArgs args)
{
shouldCancel = false;
}
private void filterPopup_PopupOpened(object sender, EventArgs args)
{
shouldCancel = true;
}
private void MultiColumnComboBoxElement_PopupClosing(object sender, RadPopupClosingEventArgs args)
{
args.Cancel = shouldCancel;
}
RadDropDownList - There is an empty line at the bottom of drop down list if you close drop down by arrow button.
Steps to reproduce :
Creating the application:
New > Project > RadControls Windows Forms Application
A wizard appears; the RadControls for Winforms version is selected (InstallFolder, not GAC)
No components nor Themes were selected
Code changed from:
public partial class Form1 : Form
to
public partial class Form1 : RadForm
The application consisted of a single drop down on the RadForm.The drop down DropDownStyle property changed to "DropDownList". The drop down had enough items to cause the scrollbar to occur.
No other properties from either form or drop down were changed.
The attached errorsteps.png are split into the following steps:
Application opened
Scroll down to the last item
Select the item
Open the drop down and scroll back to the top of the list; click the down arrow button to close the drop down
Open the drop again.
FIX. RadContextMenu/RadMenu - animations does not perform correctly on Windows 8 WORKAROUND Execute ThemeResolutionService.AllowAnimations = false; before the context menu is opened and then Allow animations again when the context menu is closed
The AccessibleName property is not respected by the Windows Narrator.
Other controls that have the same behavior:
Under specific circumstances and in Windows 2008 Server environment the RadTabStrip internally used in RadDock does not get a proper size.
Workaround:
bool performLayout = false;
protected override void OnSizeChanged(EventArgs e)
{
base.OnSizeChanged(e);
if (this.WindowState == FormWindowState.Minimized)
{
this.performLayout = true;
}
else if (this.performLayout)
{
//reset padding to force bounds update
this.Padding = new Padding(1);
this.Padding = Padding.Empty;
this.performLayout = false;
}
}
Basically, you need to override the OnSizeChanged method of the main form and first set and then reset its Padding when the it goes from Minimized to another state. This will trigger that internal layout mechanisms of our controls and you will get the RadGridView shown as expected.
The size of RadForm under Windows XP is incorrect when its initial state as MDI child is Maximized and after that the state is changed to Normal.
Workaround:
Imports Telerik.WinControls.UI
Public Class BaseRadForm
Inherits RadForm
Private Shared LastWindowState As FormWindowState = FormWindowState.Normal
Private Shared suspendClientSizeChangedFlag As Boolean = False
Protected Overrides Sub OnResizeBegin(ByVal e As System.EventArgs)
Me.MaximumSize = New Size(0, 0)
MyBase.OnResizeBegin(e)
End Sub
Protected Overrides Sub OnActivated(ByVal e As System.EventArgs)
Me.MaximumSize = New Size(0, 0)
MyBase.OnActivated(e)
End Sub
Protected Overrides Sub OnDeactivate(ByVal e As System.EventArgs)
Me.MaximumSize = New Size(0, 0)
MyBase.OnDeactivate(e)
End Sub
Protected Overrides Sub OnClientSizeChanged(ByVal e As System.EventArgs)
Dim osInfo As System.OperatingSystem = System.Environment.OSVersion
If (suspendClientSizeChangedFlag OrElse osInfo.Version.Major >= 6) Then
Return
End If
If Not LastWindowState.Equals(Me.WindowState) Then
LastWindowState = Me.WindowState
If Me.WindowState.Equals(FormWindowState.Normal) Then
suspendClientSizeChangedFlag = True
Me.MaximumSize = New Size(500, 500)
suspendClientSizeChangedFlag = False
ElseIf Me.WindowState.Equals(FormWindowState.Maximized) Then
Me.MaximumSize = New Size(0, 0)
End If
Else
Me.MaximumSize = New Size(0, 0)
End If
MyBase.OnClientSizeChanged(e)
End Sub
End Class