How to reproduce: check the attached video Workaround: select a color from a different tab or use the color picker
Workaround: manually increase the font of the controls protected override void OnShown(EventArgs e) { base.OnShown(e); var dpi = NativeMethods.GetSystemDpi(); this.Font = new Font(this.Font.Name, this.Font.Size * dpi.X / 96, this.Font.Style); this.radMenu1.Font = new Font(this.radMenu1.Font.Name, this.radMenu1.Font.Size * dpi.X / 96, this.radMenu1.Font.Style); this.radCommandBar1.Font = new Font(this.radCommandBar1.Font.Name, this.radCommandBar1.Font.Size * dpi.X / 96, this.radCommandBar1.Font.Style); }
To reproduce: add a RadLabel and change its cursor to Hand. this.radLabel1.Cursor = Cursors.Hand; The PixelatedHandCursor.png shows the poor quality of the cursor which should be improved. Workaround: https://stackoverflow.com/questions/6016995/un-antialiased-hand-cursor-in-windows-forms-apps/6017174#6017174 public class LinkLabelEx : RadLabel { private const int WM_SETCURSOR = 0x0020; private const int IDC_HAND = 32649; [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)] private static extern IntPtr LoadCursor(IntPtr hInstance, int lpCursorName); [DllImport("user32.dll", CharSet = CharSet.Auto)] private static extern IntPtr SetCursor(IntPtr hCursor); protected override void WndProc(ref Message m) { if (m.Msg == WM_SETCURSOR) { // Set the cursor to use the system hand cursor SetCursor(LoadCursor(IntPtr.Zero, IDC_HAND)); // Indicate that the message has been handled m.Result = IntPtr.Zero; return; } base.WndProc(ref m); } } The ImprovedCursorRendering.png shows the improved cursor.
The performance of the DayView when the control is bound to a large number of recurring appointments and it is grouped by resources needs to be improved.
How to reproduce: enabled High DPI scaling and create a form as an MDI child with a RadDataEntry control in it Workaround: handle the Shown event of the MDI child and manually perform the scaling private void radButtonElement1_Click(object sender, EventArgs e) { var view = new RadForm1 { MdiParent = this }; view.Shown += View_Shown; view.Show(); } private void ScaleRadControls(Control c) { foreach (var item in c.Controls) { Control control = item as Control; if (control == null) { continue; } this.mi.Invoke(control, new object[] { this.FormElement.DpiScaleFactor, BoundsSpecified.All }); ScaleRadControls(control); } } MethodInfo mi; private void View_Shown(object sender, EventArgs e) { this.mi = typeof(Control).GetMethod("ScaleControl", BindingFlags.Instance | BindingFlags.NonPublic, null, new Type[] { typeof(SizeF), typeof(BoundsSpecified) }, null); RadForm1 v = sender as RadForm1; if (v != null) { ScaleRadControls(v.radDataEntry1.PanelContainer); } }
The writing-mode attribute is ignored when rendering RadSvgImage.
Here is a sample SVG:
<svg width="200" height="200" viewBox="0 0 200 200" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg">
<g>
<text style="font-size:20px;writing-mode:tb;" x="30" y="30">
Vertical text
</text>
<text style="font-size:20px;writing-mode:vertical-lr;" x="50" y="50">
Text 2
</text>
</g>
</svg>
I'm trying to initialize RadControlSpyForm in a .NET 2.0 application and it throws the following exception:
System.InvalidCastException: 'Unable to cast object of type 'System.Windows.Forms.SplitContainer' to type 'System.ComponentModel.ISupportInitialize'.
I did some research, and I found that since SplitContainer doesn't inherit from System.ComponentModel.ISupportInitialize until .NET 4.0, this message shows up in solutions where a project is downgraded from .NET 4.0, but the Form designer isn't regenerated to remove the SplitContainer cast to ISupportInitialize to call BeginInit() and EndInit().
1. Set the DPI of your main monitor to 150% and the DPI of your secondary monitor to 100%.
2. Start your main form containing RadDataEntry on your secondary monitor.
You will see that that hosted controls inside RadDataEntry are not scaled correctly.
Workaround:
Start your main form on your secondary monitor inside OnShown event.
protected override void OnShown(EventArgs e)
{
base.OnShown(e);
this.Location = new Point(-800, 100);
}
1. Set HDPI on your monitor (for example 150%)
2. Set RadDataEntry data source in RunTime
You will see that RadDataEntry hosted controls are not scaled correctly.
Note that there is a related problem if the data source is set in design time. Controls themselves will be scaled correctly, however, text box hosted control's High will not be scaled correctly.
Workaround:
You can subscribe to ItemInitializing event before you set the DataSource and proceed by scaling RadDataEntry hosted controls manually as shown in the following code snipped.
private void radButton1_Click(object sender, EventArgs e)
{
this.radDataEntry1.ItemInitializing += RadDataEntry1_ItemInitializing;
this.radDataEntry1.ItemDefaultSize = new Size(200, 26);
radDataEntry1.DataSource = new Employee
{
FirstName = "Sarah",
LastName = "Blake",
Occupation = "Supplied Manager",
StartingDate = new DateTime(2005, 04, 12),
IsMarried = true,
Salary = 3500,
Gender = Gender.Female
};
}
private void RadDataEntry1_ItemInitializing(object sender, ItemInitializingEventArgs e)
{
if (this.radDataEntry1.RootElement.DpiScaleFactor.Width != 1)
{
foreach (Control control in e.Panel.Controls)
{
control.Scale(this.radDataEntry1.RootElement.DpiScaleFactor);
}
}
}
Use the attached sample project.
Sceen 1 (Screen with program shortcuts) on the right in the gif: this screen has display scale 125%
Screen 2 (Screen with the Form) on the left in the gif: this screen has display scale 100%
When all three toolwindows are placed in the forms, there is no issue. The Dropdown list of ToolWindow1 (floating, dockable..) when opened is placed correctly.
If I moved the ToolWindow3 from Screen2 to Screen1 and make it the most recent active window (by clicking on it), I go back to the Screen2 and open the dropdown list of Toolwindow1, this list's position is now wrong and the text size bigger. This is because it takes the display scale (125%) of the screen where the most recent active toolwindow (ToolWindow3 ) is.
If I popup the ToolWindow2, place it in Screen2 (the same screen with ToolWindow1), make ToolWindow2 the most recent active window, and open the dropdown list of Toolwindow1, this list's position is now correct and the text size normal. This is because it takes the display scale (100%) of the screen where the most recent active toolwindow (ToolWindow2 ) is.
Workaround: add app.manifest file and declare the application as DPI aware:
To replicate the missing button when the application is run on my main monitor with 150% DPI scaling:
If the RadControl.EnableRadAutoScale property is set to false in the Program.cs file, the button is placed as expected:
When I replace the form to inherit from RadForm, not the MS Form, the button is clipped:
To reproduce:
- Open The popup
- Click on it, and then click on the form
- Repeat until the popup stays opened
LineSeries lineSeries = new LineSeries();
lineSeries.DataPoints.Add(new CategoricalDataPoint(6, DateTime.Now));
lineSeries.DataPoints.Add(new CategoricalDataPoint(4, DateTime.Now.AddDays(1)));
lineSeries.DataPoints.Add(new CategoricalDataPoint(7, DateTime.Now.AddDays(2)));
lineSeries.DataPoints.Add(new CategoricalDataPoint(5, DateTime.Now.AddDays(3)));
lineSeries.DataPoints.Add(new CategoricalDataPoint(3, DateTime.Now.AddDays(4)));
lineSeries.DataPoints.Add(new CategoricalDataPoint(8, DateTime.Now.AddDays(5)));
lineSeries.DataPoints.Add(new CategoricalDataPoint(7, DateTime.Now.AddDays(6)));
lineSeries.DataPoints.Add(new CategoricalDataPoint(10, DateTime.Now.AddDays(7)));
lineSeries.DataPoints.Add(new CategoricalDataPoint(4, DateTime.Now.AddDays(8)));
lineSeries.DataPoints.Add(new CategoricalDataPoint(5, DateTime.Now.AddDays(9)));
lineSeries.DataPoints.Add(new CategoricalDataPoint(2, DateTime.Now.AddDays(10)));
DateTimeContinuousAxis continuousAxis = new DateTimeContinuousAxis();
continuousAxis.PlotMode = AxisPlotMode.OnTicks;
continuousAxis.LabelFormat = "{0:d}";
continuousAxis.ScaleBreakStyle = ScaleBreakStyle.Ragged;
lineSeries.HorizontalAxis = continuousAxis;
this.radChartView1.Series.Add(lineSeries);
DateTimeContinuousAxis horizontalAxis = radChartView1.Axes.Get<DateTimeContinuousAxis>(0);
AxisScaleBreak scaleBreakItem = new AxisScaleBreak();