To reproduce:
- Set the icon of the form.
- Set the FormBorderStyle to FixedToolWindow.
- The default icon is displayed in the taskbar.
Workaround:
public RadForm2()
{
InitializeComponent();
this.ShowIcon = true;
}
protected override void OnShown(EventArgs e)
{
base.OnShown(e);
this.FormElement.TitleBar.IconPrimitive.Visibility = ElementVisibility.Collapsed;
}
To reproduce: 1. Create a RadForm - Form1 2. Change its BackColor at design time 3. Create another RadForm - Form2 4. Open it at design time. It is expected to have the BackColor coming from the parent form. Workaround: Set the color in the form's constructor instead of at design time.
Use attached to reproduce. This was working in version 2017.1.221
Workaround:
private void Instance_LocationChanged(object sender, EventArgs e)
{
var box = sender as RadMessageBoxForm;
box.Location = new Point((this.Location.X + this.Width / 2) - (box.Width/2), (this.Location.Y + this.Height / 2 )- (box.Height/2));
}
To reproduce:
public partial class RadRibbonForm1 : Telerik.WinControls.UI.RadRibbonForm
{
public RadRibbonForm1()
{
InitializeComponent();
this.AllowAero = true;
this.RibbonBar.QuickAccessToolbarBelowRibbon = false;
}
}
Note: the system buttons not always handle the mouse click.
Workaround: set AllowAero to false OR RibbonBar.QuickAccessToolbarBelowRibbon to true.
How to reproduce: create a DPI-aware application and set the AllowAero property of the ribbon form to false, the titlebar will not be themed
Workaround: override the ScaleControl method of in the RadRibbonForm instance in the project
Protected Overrides Sub ScaleControl(ByVal factor As SizeF, ByVal specified As BoundsSpecified)
MyBase.ScaleControl(factor, specified)
If Me.HasOwnToolbar AndAlso Me.AllowTheming AndAlso Not Me.IsDesignMode AndAlso Me.IsInitialized Then
Me.AllowTheming = False
End If
End Sub
Please refer to the attached sample project. Workaround: Initialize the form just before showing it.
To reproduce: follow the steps from the attached gif file.
Workaround:
public RadForm1()
{
InitializeComponent();
((RadRibbonFormBehavior)this.FormBehavior).AllowTheming = false;
}
To reproduce:
RadForm form = new RadForm();
form.WindowState = FormWindowState.Maximized;
form.Text = string.Format("Child {0}", MdiChildren.Length + 1);
form.MdiParent = this;
form.Show();
Hover the Form's title bar the tooltip should start flashing/blinking
Workaround:
Sub New()
InitializeComponent()
AddHandler RadMessageBox.Instance.LocationChanged, AddressOf MsgLocationChanged
End Sub
Private Sub MsgLocationChanged(sender As Object, e As EventArgs)
RadMessageBox.Instance.Location = New Point(Me.Location.X + Me.Width / 2 - RadMessageBox.Instance.Width / 2, _
Me.Location.Y + Me.Height / 2)
End Sub
Use attached to reproduce. The exception message: "A circular control reference has been made. A control cannot be owned by or parented to itself.". Workaround: Do not specify the owner when showing the message box.
Workaround:
Sub New()
InitializeComponent()
AddHandler RadMessageBox.Instance.LocationChanged, AddressOf MsgLocationChanged
End Sub
Private Sub RadTreeView1_NodeMouseClick(sender As Object, e As Telerik.WinControls.UI.RadTreeViewEventArgs) Handles RadTreeView1.NodeMouseClick
If RadMessageBox.Show(Me, String.Format("Change Project to {0}{1}{0}?", Chr(34), e.Node.Text), "Change Project", MessageBoxButtons.YesNo, _
RadMessageIcon.Question, MessageBoxDefaultButton.Button1) = Windows.Forms.DialogResult.Yes Then
End If
End Sub
Private Sub MsgLocationChanged(sender As Object, e As EventArgs)
RadMessageBox.Instance.Location = New Point(Me.Location.X + Me.Width / 2, Me.Location.Y + Me.Height / 2)
End Sub
Workaround: change all RadForms to inherit the following custom base form
public class RadFormBase : RadForm
{
protected override void OnLoad(EventArgs e)
{
if (this.IsDesignMode)
{
this.BackColor = Color.Empty;
}
base.OnLoad(e);
}
public override Color BackColor
{
get
{
return this.ElementTree.RootElement.BackColor;
}
set
{
if (value == Color.Empty)
{
this.ElementTree.RootElement.ResetValue(VisualElement.BackColorProperty, ValueResetFlags.Local);
}
else
{
this.ElementTree.RootElement.BackColor = value;
}
}
}
}
To reproduce: run the attached sample project and refer to the screenshot. Workaround: ((TextPrimitive)this.FormElement.TitleBar.CaptionElement).UseCompatibleTextRendering=true; or set the RadForm.AllowTheming property to false.
Steps to reproduce: 1. Create an application with RadForm and few controls under .Net 4.7 2. Start the application on 4K monitor (primary screen) with high DPI (200-percent scale) 3. The form is not scaled correctly. Windows do not send the message that the scale factor is changed. The issue is observed when the form is initially starting on high DPI (125-percent or higher).
Steps to reproduce: 1. Build an application targeting x64 platform. 2. Setup your monitors such that one has negative coordinates. 3. Run the application and move a form to the negative coordinates space. 4. You will see a System.OverflowException.
RadForm has AllowTheming property which enables/disables the aero effects of RadForm and when you set it to false our theming mechanism is disabled. Add a property,e.g. ThemeResolutionService.ApplicationAllowTheming, which will control the AllowTheming of all forms in the application. In addition, RadForm should have a new property,e.g. EnableApplicationAllowTheming, which will control whether the respective form should respect the global property or not. Case 1: ThemeResolutionService.ApplicationAllowTheming = true RadForm1.EnableApplicationAllowTheming=true //this property is set to true; this indicates that the local AllowTheming property WON'T be respected and the global property ApplicationAllowTheming takes effect RadForm1.AllowTheming=false RadForm1 has theming. RadForm2.EnableApplicationAllowTheming=false //this property is set to false; this indicates that the local AllowTheming WILL be respected and the global property ApplicationAllowTheming DOESN'T take effect RadForm2.AllowTheming=false RadForm2 doesn't have theming. Case 2: ThemeResolutionService.ApplicationAllowTheming = false RadForm1.EnableApplicationAllowTheming=true //this property is set to true; this indicates that the local AllowTheming property WON'T be respected and the global property ApplicationAllowTheming takes effect RadForm1.AllowTheming=true RadForm1 doesn't have theming. RadForm2.EnableApplicationAllowTheming=false //this property is set to false; this indicates that the local AllowTheming WILL be respected and the global property ApplicationAllowTheming DOESN'T take effect RadForm2.AllowTheming=true RadForm2 has theming. Note: the same logic is implemented for the ThemeResolutionService.ApplicationThemeName: http://docs.telerik.com/devtools/winforms/themes/using-a-default-theme-for-the-entire-application
To reproduce: - Add 3 MDI child forms with a lot of gauges. - Set their WindowState to maximized. - Show each upon a button click. Workaround: Set the state of all forms to normal, before adding a new maximized form.
The issue can be reproduced by creating a form with a width of 1200 pixels in an application that is DPI aware. Then the project is run on a tablet with low resolution and an increased DPI, e.g. 1024 x 768 and scaling 120%.
Workaround:
Public Class RadForm1
Sub New()
InitializeComponent()
Dim g = Me.CreateGraphics()
Dim scale = 96.0 / g.DpiX
Me.Size = New Size(scale * Me.ClientSize.Width, scale * Me.ClientSize.Height)
g.Dispose()
Me.WindowState = FormWindowState.Normal
End Sub
End Class
How to reproduce:
public partial class RadForm1 : RadForm
{
public RadForm1()
{
InitializeComponent();
this.AllowTheming = false;
this.FormBorderStyle = FormBorderStyle.FixedSingle;
}
}
Workaround:
public partial class RadForm1 : RadForm
{
public RadForm1()
{
InitializeComponent();
this.AllowTheming = false;
this.FormBorderStyle = FormBorderStyle.FixedSingle;
}
protected override FormControlBehavior InitializeFormBehavior()
{
return new MyRadFormBehavior(this, true);
}
}
public class MyRadFormBehavior : RadFormBehavior
{
public MyRadFormBehavior(IComponentTreeHandler treeHandler, bool shouldCreateChildren)
: base(treeHandler, shouldCreateChildren)
{ }
public override bool HandleWndProc(ref System.Windows.Forms.Message m)
{
BindingFlags bindingFlags = BindingFlags.Instance | BindingFlags.NonPublic;
if (m.Msg == NativeMethods.WM_NCHITTEST)
{
typeof(RadFormBehavior).GetMethod("OnWMNCHittest", bindingFlags).Invoke(this, new object[] { m });
return true;
}
if (!this.AllowTheming)
{
return false;
}
return base.HandleWndProc(ref m);
}
}