How to reproduce: check the attached screenshot Workaround create a custom RadPrintPreviewDialog public class MyRadPrintPreviewDialog : RadPrintPreviewDialog { protected override WatermarkPreviewDialog CreateWatermarkDialog() { WatermarkPreviewDialog dialog = new WatermarkPreviewDialog(this.Document); RadPageViewPage pageText = (RadPageViewPage)dialog.Controls["radPageView1"].Controls["pageText"]; ((PlusMinusEditor)pageText.Controls["plusMinusEditorTextHOffset"]).TextBox.Width = 43; ((PlusMinusEditor)pageText.Controls["plusMinusEditorTextVOffset"]).TextBox.Width = 43; ((PlusMinusEditor)pageText.Controls["plusMinusEditorTextAngle"]).TextBox.Width = 43; ((PlusMinusEditor)pageText.Controls["plusMinusEditorTextOpacity"]).TextBox.Width = 43; RadPageViewPage pagePicture = (RadPageViewPage)dialog.Controls["radPageView1"].Controls["pagePicture"]; ((PlusMinusEditor)pagePicture.Controls["plusMinusEditorImageHOffset"]).TextBox.Width = 43; ((PlusMinusEditor)pagePicture.Controls["plusMinusEditorImageVOffset"]).TextBox.Width = 43; ((PlusMinusEditor)pagePicture.Controls["plusMinusEditorImageOpacity"]).TextBox.Width = 43; return dialog; } }
How to reproduce: set the MinimumSize property of a RadButton in a DPI-aware app Workaround: Public Class RadForm1 Dim minMaxStack = New Stack(Of Dictionary(Of Control, Tuple(Of Size, Size)))() Sub New() InitializeComponent() End Sub Protected Overrides Sub HandleDpiChanged() Dim scaleFactor As Single = 1.0F Dim oldDpi = GetType(RadFormControlBase).GetField("oldDpi", BindingFlags.Instance Or BindingFlags.NonPublic).GetValue(Me) Dim currentDpi = GetType(RadFormControlBase).GetField("currentDpi", BindingFlags.Instance Or BindingFlags.NonPublic).GetValue(Me) If oldDpi <> 0 Then scaleFactor = CSng(currentDpi) / oldDpi ElseIf oldDpi = 0 Then scaleFactor = CSng(currentDpi) / 96.0F End If If scaleFactor = 1.0F Then Return End If Me.SaveMinMaxStates() MyBase.HandleDpiChanged() Me.RestoreMinMaxStates() End Sub Private Sub SaveMinMaxStates() If Me.minMaxStack Is Nothing Then Me.minMaxStack = New Stack(Of Dictionary(Of Control, Tuple(Of Size, Size)))() End If Dim minMax As New Dictionary(Of Control, Tuple(Of Size, Size))() Dim queue As New Queue(Of Control)() For Each ctrl As Control In Me.Controls queue.Enqueue(ctrl) Next While queue.Count > 0 Dim ctrl As Control = queue.Dequeue() If TypeOf ctrl Is RadControl Then minMax.Add(ctrl, New Tuple(Of Size, Size)(ctrl.MinimumSize, ctrl.MaximumSize)) ctrl.MinimumSize = Size.Empty ctrl.MaximumSize = Size.Empty End If For Each childControl As Control In ctrl.Controls queue.Enqueue(childControl) Next End While Me.minMaxStack.Push(minMax) End Sub Private Sub RestoreMinMaxStates() Dim minMax As Dictionary(Of Control, Tuple(Of Size, Size)) = Me.minMaxStack.Pop() Dim queue As New Queue(Of Control)() For Each ctrl As Control In Me.Controls queue.Enqueue(ctrl) Next While queue.Count > 0 Dim ctrl As Control = queue.Dequeue() If minMax.ContainsKey(ctrl) Then ctrl.MinimumSize = minMax(ctrl).Item1 ctrl.MaximumSize = minMax(ctrl).Item2 minMax.Remove(ctrl) End If For Each childControl As Control In ctrl.Controls queue.Enqueue(childControl) Next End While minMax.Clear() End Sub End Class
The ImageList property is visible in the Properties section of VisualStudio for RadTextBox, RadTextBoxControl etc.
To reproduce: - Open Theme Viewer, go ListView and sort it. - Change the theme to Fluent. Workaround: - Set the visibility of the item in the theme (see attached).
Similar to Material Themes Blending (https://docs.telerik.com/devtools/winforms/tools/visual-style-builder/working-with-visual-style-builder/material-themes-blending) provide an easy way to change the palette for the Fluent themes.
Use attached project to reproduce. Workaround: Use attached theme.
To reproduce: Add some buttons to a form set the theme to Fluent and press the button using the space button Workaround: Use the attached theme.
Is it possible to add a Hamburger Menu to the Telerik UI for WinForms? like: https://docs.microsoft.com/en-us/windows/uwp/design/controls-and-patterns/navigationview
How to reproduce: this.radLabel1.Font = new System.Drawing.Font("Arial", 20F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel); Workaround: public class MyRadLabel : RadLabel { public override string ThemeClassName { get { return typeof(RadLabel).FullName; } } protected override RadLabelElement CreateLabelElement() { return new MyRadLabelElement(); } } public class MyRadLabelElement : RadLabelElement { protected override Type ThemeEffectiveType { get { return typeof(RadLabelElement); } } protected override void CreateChildElements() { base.CreateChildElements(); MyTextPrimitive textPrimitive = new MyTextPrimitive(); textPrimitive.Alignment = ContentAlignment.MiddleLeft; textPrimitive.BindProperty(TextPrimitive.TextProperty, this, RadLabelElement.TextProperty, PropertyBindingOptions.TwoWay); textPrimitive.BindProperty(AlignmentProperty, this, RadLabelElement.TextAlignmentProperty, PropertyBindingOptions.OneWay); textPrimitive.SetValue(ImageAndTextLayoutPanel.IsTextPrimitiveProperty, true); textPrimitive.AutoEllipsis = true; textPrimitive.TextWrap = true; ImageAndTextLayoutPanel layoutPanel = this.FindDescendant<ImageAndTextLayoutPanel>(); if (layoutPanel != null) { layoutPanel.Children.RemoveAt(1); layoutPanel.Children.Add(textPrimitive); } } } public class MyTextPrimitive : TextPrimitive { public override Font GetScaledFont(float scale) { Screen screen = Screen.PrimaryScreen; SizeF startScale = new SizeF(1.0f, 1.0f); if (RadControl.EnableDpiScaling) { startScale = NativeMethods.GetMonitorDpi(screen, NativeMethods.DpiType.Effective); } SizeF paintScale = new SizeF(scale / startScale.Width, scale / startScale.Height); Font font = this.Font ?? Control.DefaultFont; string key = paintScale.ToString() + font.FontFamily.Name + font.Size + font.Style.ToString() + font.Unit.ToString() + font.GdiCharSet.ToString() + font.GdiVerticalFont.ToString(); if (this.ScaledFontsCache.ContainsKey(key)) { return this.ScaledFontsCache[key]; } Font scaledFont = new Font(font.FontFamily, font.Size * paintScale.Height, font.Style, font.Unit, font.GdiCharSet, font.GdiVerticalFont); this.ScaledFontsCache.Add(key, scaledFont); return scaledFont; } }
ApplicationButton and QuickStartToolbar layout do not look good when user changed the theme in runtime. Issue can be reproduced with Office2010Silver, Deser, HighContrastBlack and Windows7 themes. Workaround: call recursively the UpdateLayout method for all RadControls in the form: ThemeResolutionService.ApplicationThemeName = item.Text; this.RefreshAll(); m_strThemeName = item.Text; SaveThemeName(); ... } private void RefreshAll() { foreach(Control control in this.Controls) { RefreshAllControls(control); } } void RefreshAllControls(Control ctrl) { foreach (Control control in ctrl.Controls) { RadControl radControl = control as RadControl; if (radControl != null) { radControl.RootElement.InvalidateMeasure(true); radControl.RootElement.UpdateLayout(); } RefreshAllControls(control); } }
Html-like text background color get spots of 1px whitespace between words.
This property will disable the accessibility information from being sent to Windows narrator and JAWS.
PrintSettings dialog crash if Printer's SourceName is empty. Workarround: Enumerate printers and set a name for empty Source Names. class MyPrintSettingDialog : PrintSettingsDialog { public MyPrintSettingDialog(RadPrintDocument document):base(document) { } public MyPrintSettingDialog():base() { } protected override void LoadSettings() { PrinterSettings.PaperSourceCollection paperSourceCollection = this.PrintDocument.PrinterSettings.PaperSources; int index = 0; while (index < paperSourceCollection.Count) { if (string.IsNullOrEmpty(paperSourceCollection[index].SourceName) || paperSourceCollection[index].SourceName == "-1") { paperSourceCollection[index].SourceName = "NONEMPTY NAME"; } index++; } base.LoadSettings(); } }
RadListSource should discover properties from its DataSoucre via ITypedList if the DataSource implements this interface.
If you have a RadSplitContainer with three panels, the image set to the grip will not be shown for the second splitter.
Let's say that we have a RadLabel and want to show Dot style border for it. The Dot, however, appears as thinner Line when we set the DashStyle to Dot.
Project Update Utility should be able to update vbproj files as well.
RadScreeTip has a wrong size the first time it is displayed. This size cannot be changed.
When RadComboBox is dynamically filled with items, the layout does not give a valid size to the items, since the dropdown is not initially opened. The current workaround is to call the UpdateLayout method: this.radComboBox1.ComboBoxElement.ComboPopupForm.ListBox.UpdateLayout();