Hi support,
I think I found an issue with the default behavior of Telerik UI for Winforms on a HighDPI PerMonitorV2 configuration.
The application works correctly and resizes well if moved between screen with different Font Scalings.
However, if the user changes the main screen to one with a different scaling, the application is strangely taking the change into account and would also not come back to its original state.
Attached is a GIF showing the problem and the project. The application on run on screen 3 being main display at 100% FontScale. If I pass Screen 1, the main display (which is 125% font scaled), the icons of the app are made larger (for no reason), going back to screen 1 being the main screen, will not restore the icon to the correct size, unless you make parts of the application being redrawn.
I've a more related question but it's more complex and I won't be able to provide a project for this, so I'm just trying here ;) In our real application (not this test one), when setting PerMonitorV2 mode, we need to have RadControl.EnableRadAutoScale set to false for the controls to resize correctly when changing monitors whereas this [test] application needs it to be let it set to true to kind of do the same thing ?! Any idea on where the difference can come from ?
Thanks & regards,
Benjamin Foucher
The AccessibleName property is not respected by the Windows Narrator.
Other controls that have the same behavior:
Use the following code snippet:
Sub New()
InitializeComponent()
Me.RadCheckedDropDownList1.ShowCheckAllItems = True
Me.RadCheckedDropDownList1.AutoSizeItems = True
For x = 1 To 20
Dim i As New DescriptionTextCheckedListDataItem
i.Value = x
i.Text = x.ToString()
i.DescriptionText = "abc def ghijkl mnop abc def ghijkl mnop" & x
Me.RadCheckedDropDownList1.Items.Add(i)
Next
End SubOpen the popup, scroll to the bottom and then back to the top.
Expected: The CheckAllItem is visible
Actual: The CheckAllItem is hidden
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);
}
}
}
Please run the attached sample project and navigate with the left/right arrows as it is demonstrated in the gif file.
This width is 6px by default and it doesn't offer convenient API for customizing it:
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);
}
}
}
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.
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.
Implement support for UI Automation. When the control is focused, Windows Narrator will read the AccessibleName property if set.
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;
}