Completed
Last Updated: 20 Feb 2018 13:55 by ADMIN
ADMIN
Created by: Dess | Tech Support Engineer, Principal
Comments: 2
Category: Form
Type: Bug Report
1
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.
Completed
Last Updated: 30 Aug 2016 13:14 by ADMIN
How to reproduce: 
1. Maximize a RadForm on a remote desktop machine using 2016.2.608 version
2. Maximize a RadForm on a Windows 7 machine with a disabled Aero using 2016.2.608 version
3. Maximize a RadForm on a Windows Server 2003 R2 using 2016.2.608 version
4. Maximize a RadForm on a Windows Server 2008 R2 using 2016.2.608 version

Workaround:

 public partial class RadForm1 : RadForm
    {
        public RadForm1()
        {
            InitializeComponent();
        }

        //Workaround
        protected override Telerik.WinControls.RootRadElement CreateRootElement()
        {
            return new MyFormRootElement(this);
        }
    }
public class MyFormRootElement : FormRootElement
    {
        private RadForm formControl;

        public MyFormRootElement(RadForm radForm1) : base(radForm1)
        {
        }

        protected override Type ThemeEffectiveType
        {
            get
            {
                return typeof(RootRadElement);
            }
        }

        protected override void OnPropertyChanged(RadPropertyChangedEventArgs e)
        {
            this.formControl = this.GetType().BaseType.GetField("formControl", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(this) as RadForm;

            if (e.Property == RadElement.BoundsProperty)
            {
                if ((this.Shape != null) && (this.formControl != null) &&
                    this.ApplyShapeToControl)
                {
                    Rectangle oldBounds = (Rectangle)e.OldValue;
                    Rectangle newBounds = (Rectangle)e.NewValue;

                    if (oldBounds.Size != newBounds.Size)
                    {
                        CreateRegionFromShape(newBounds.Size);
                    }
                }
            }
            else if ((e.Property == ShapeProperty) && this.ApplyShapeToControl)
            {
                ElementShape shape = e.NewValue as ElementShape;
                if ((shape != null) && (this.ElementTree != null))
                {
                    CreateRegionFromShape(this.Size);
                }
            }
            else if (e.Property == ApplyShapeToControlProperty)
            {
                if ((bool)e.NewValue && this.Shape != null)
                {
                    CreateRegionFromShape(this.Size);
                }
                else
                {
                    this.ElementTree.Control.Region = null;
                }
            }
            else
            {
                base.OnPropertyChanged(e);
            }
        }

        private void CreateRegionFromShape(Size regionSize)
        {
            Region newRegion = null;
            this.formControl = this.GetType().BaseType.GetField("formControl", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(this) as RadForm;

            if (this.formControl.WindowState != FormWindowState.Maximized || this.formControl.MaximumSize != Size.Empty)
            {
                Rectangle boundsRect = new Rectangle(Point.Empty, regionSize);

                using (GraphicsPath path = this.Shape.CreatePath(boundsRect))
                {
                    newRegion = new Region(path);
                }
            }
            else if (!(IsWindows7 && !DWMAPIHelper.IsCompositionEnabled))
            {
                int borderLenght = DWMAPIHelper.IsCompositionEnabled ? SystemInformation.FixedFrameBorderSize.Height :
                                   SystemInformation.FrameBorderSize.Height;
                borderLenght += borderLenght;

                if (!IsWindows8OrHigher)
                {
                    borderLenght += 2;
                }
                else
                {
                    borderLenght += 1;
                }

                Rectangle boundsRect = new Rectangle(new Point(borderLenght, borderLenght),
                    new Size(regionSize.Width - (borderLenght * 2), regionSize.Height - (borderLenght * 2)));

                using (GraphicsPath path = new GraphicsPath())
                {
                    path.AddRectangle(boundsRect);
                    newRegion = new Region(path);
                }
            }

            Region region = this.formControl.Region;

            if (!AreEqualRegions(region, newRegion))
            {
                this.formControl.Region = newRegion;
            }
        }

        private bool IsWindows8OrHigher
        {
            get
            {
                OperatingSystem os = Environment.OSVersion;
                return os.Platform == PlatformID.Win32NT &&
                       (os.Version.Major > 6 || (os.Version.Major == 6 && os.Version.Minor >= 2));
            }
        }

        private bool IsWindows7
        {
            get
            {
                OperatingSystem os = Environment.OSVersion;
                return os.Platform == PlatformID.Win32NT &&
                       ((os.Version.Major == 6 && os.Version.Minor == 1) || os.Version.Major < 6);
            }
        }

        private static bool AreEqualRegions(Region regionX, Region regionY)
        {
            if (regionX == null && regionY == null)
            {
                return true;
            }

            if (regionX == null || regionY == null)
            {
                return false;
            }

            byte[] regionDataX = regionX.GetRegionData().Data;
            byte[] regionDataY = regionY.GetRegionData().Data;

            int length = regionDataX.Length;

            if (length != regionDataY.Length)
            {
                return false;
            }

            for (int i = 0; i < length; i++)
            {
                if (regionDataX[i] != regionDataY[i])
                {
                    return false;
                }
            }

            return true;
        }
    }

    internal class DWMAPIHelper
    {
        [DllImport("dwmapi.dll")]
        public static extern void DwmIsCompositionEnabled(ref bool isEnabled);

        public static bool IsVista
        {
            get
            {
                return Environment.OSVersion.Version.Major >= 6;
            }
        }

        public static bool IsCompositionEnabled
        {
            get
            {
                if (!IsVista)
                {
                    return false;
                }
                bool enabled = false;
                DwmIsCompositionEnabled(ref enabled);
                return enabled;
            }
        }
    }

    
    }
Completed
Last Updated: 29 Jun 2016 05:49 by ADMIN
How to reproduce:
public partial class Form1 : Form
{
    Timer timer;

    public Form1()
    {
        InitializeComponent();

        timer = new Timer();
        timer.Interval = 1000; 
        timer.Tick += new EventHandler(MyTimer_Tick);
        timer.Start();
    }

    protected override void OnShown(EventArgs e)
    {
        base.OnShown(e);

        RadMessageBox.Show("Shown");
    }

    private void MyTimer_Tick(object sender, EventArgs e)
    {
        RadMessageBox.Show("Form closed");
        this.Close();
    }
}

Workaround: dispose the old instance
private void MyTimer_Tick(object sender, EventArgs e)
{
    RadMessageBox.Instance.Dispose();

    RadMessageBox.Show("Form closed");
    this.Close();
}
Completed
Last Updated: 14 Jun 2016 06:38 by ADMIN
ADMIN
Created by: Dess | Tech Support Engineer, Principal
Comments: 0
Category: Form
Type: Bug Report
0
Please refer to the attached sample project.

Workaround: call the Close method in the Shown event.
Completed
Last Updated: 09 Jun 2016 05:02 by ADMIN
Steps to reproduce: 
1. Create Telerik WinForms Application and add two RadForm
2. Select one of forms and set the IsMdiContainer property to true 
3. Select the child form. Open the Properties window and set the following properties at design time: 
 - WindowState to Maximized 
 - ThemeName to Windows8 or any other theme 
4. Run the application and show the child form. The child form is cut off instead maximized. 

Workaround: 
1. Reset the WindowState property at design time
2. Subscribe to the Form`s Load event and set the WindowState property 
private void RadForm2_Load(object sender, EventArgs e)
{
    this.WindowState = FormWindowState.Maximized;
}
Completed
Last Updated: 08 Jun 2016 09:54 by ADMIN
ADMIN
Created by: Dess | Tech Support Engineer, Principal
Comments: 0
Category: Form
Type: Bug Report
0
To reproduce:

private void radButton1_Click(object sender, EventArgs e)
{ 
    StringBuilder detailsText = new StringBuilder();
    for (int i = 0; i < 10; i++)
    {
        detailsText.AppendLine("Line" + i);
    }
    detailsText.AppendLine("END");

   RadMessageBox.Show("Message", "Caption Text", MessageBoxButtons.AbortRetryIgnore, detailsText.ToString());
}

Workaround: enlarge the details section in order to fit the text: 

 FieldInfo fi = typeof(RadMessageBoxForm).GetField("detailsSectionHeight", BindingFlags.NonPublic| BindingFlags.Instance);
fi.SetValue(RadMessageBox.Instance,200); 
Completed
Last Updated: 19 Apr 2016 11:37 by ADMIN
ADMIN
Created by: Dess | Tech Support Engineer, Principal
Comments: 0
Category: Form
Type: Bug Report
0
Please refer to the attached project.

Workaround: maximize the form in the Load event.
Completed
Last Updated: 04 Feb 2016 08:00 by ADMIN
To reproduce:
- Add two buttons and a textbox to a RadForm.
- Set the AcceptButton to be the first button.
- Focus the second button and press Enter

Workaround:
protected override bool ProcessCmdKey(ref System.Windows.Forms.Message msg, System.Windows.Forms.Keys keyData)
{
    if (keyData == System.Windows.Forms.Keys.Enter)
    {
        if (this.ActiveControl is Button && this.ActiveControl != this.AcceptButton)
        {
            ((Button)this.ActiveControl).PerformClick();
            return true;
        }
        
    }

    return base.ProcessCmdKey(ref msg, keyData);
}
Completed
Last Updated: 31 Aug 2016 07:41 by ADMIN
To reproduce:
- Create a new form.
- Change the Localizable property to true.
- Add a RadLabel to the form.
- Select the label and change its name to "name with space" and press Enter.
- VS editor will say that it is an invalid name and return the name to previous value.
- Now look at designer.cs file of the form and you will see a lot of RootElement properties getting values form resource!

Same issue can be reproduced by localizing a custom control:
- Open UserControl.cs in Design mode.
- On property editor, change property Language from "(Default)" to "Portuguese (Brazil)".
- Now change a label text  to "Nome".
- See file EditUserControl.Designer.cs. It has many RootElement lines!

Workaround:
Delete the generated code and rebuild.
Completed
Last Updated: 16 Nov 2015 16:13 by ADMIN
To reproduce: 
- Start the narrator, open a message box and close it fast.
 
Workaround:
void button_Click(object sender, EventArgs e)
{
    RadMessageBox.Instance.Shown += Instance_Shown;
    RadMessageBox.Show("test");
}

void Instance_Shown(object sender, EventArgs e)
{
    RadMessageBoxForm form = sender as RadMessageBoxForm;

    typeof(RadMessageBoxForm).GetField("accObjectCreated", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance).SetValue(form, false);
}
Completed
Last Updated: 21 Oct 2015 09:50 by ADMIN
To reproduce: 
- Use the approach described here to localize the form: https://msdn.microsoft.com/en-us/library/y99d1cd3%28v=vs.100%29.aspx?f=255&MSPPError=-2147217396
- Open the resx file in Visual Studio.

Completed
Last Updated: 15 Feb 2016 09:08 by ADMIN
UPDATED: this is reproducible in a non-MDI scenario is well.

Sub New()
    InitializeComponent()
    Me.Size = New Size(500, 500)
End Sub


To reproduce:

1. Add two RadForms - a parent and a child.
2. Set the MinimumSize property of the child form at design time.
3. Use the following code snippet:

public partial class ParentForm : RadForm
{
    public ParentForm()
    {
        InitializeComponent();

        this.IsMdiContainer = true;

        ChildForm form = new ChildForm();
        form.Text = "MDI Child 1";
        form.MdiParent = this;
        form.Size = new System.Drawing.Size(600, 600);
        form.Show();
    }
}

public partial class ChildForm : Telerik.WinControls.UI.RadForm
{
    public ChildForm()
    {
        InitializeComponent();
        this.SizeChanged += ChildForm_SizeChanged;
    }
    
    private void ChildForm_SizeChanged(object sender, EventArgs e)
    {
        this.Text = "ChildForm " + this.Size.Width + " x " + this.Size.Height;
    }
}

When you run the application with version 2015.2 623, you will notice that the child form is loaded with its MinimumSize. However, in the previous version it is loaded with the expected specified Size(600, 600).

Workaround: use ShapedForm with titlebar. An alternative solution is to set the RadForm.Size property in the Shown event.
Completed
Last Updated: 24 Jul 2015 10:20 by ADMIN
Broken in Q2 2015

Workaround: get current dpi settings and resize the form
float dpiX = 0;
float dpiY = 0;
Graphics graphics = this.CreateGraphics();
dpiX = graphics.DpiX;
dpiY = graphics.DpiY;

this.Width *= dpiX / 96;
this.Height *= dpiY / 96;
Completed
Last Updated: 22 Apr 2021 14:51 by ADMIN
Release R2 2021
To reproduce:
- Create a RadForm with a public label in it. 
- Inherit the new form and change the label text.
- Open the second form at design time - the file status is changed to modified.
Completed
Last Updated: 27 Mar 2015 08:06 by ADMIN
To reproduce: 
1. Use the following code snippet: 
RadMessageBox.Show("RadMessageBox Some message box text", "Caption", MessageBoxButtons.OK, RadMessageIcon.Error);
2. The text is not aligned with the icon
Completed
Last Updated: 01 Jun 2017 07:56 by ADMIN
To reproduce:

1. Add a RadForm with a RadButton and a RadGridView.
2. Use the following code snippet:
 public Form1()
        {
            InitializeComponent();

            this.AutoScroll = true;           
            this.radGridView1.Location = new Point(10, 500);                   
        }
3. Please refer to the attached gif file.

Workaround:

Use RadScrollablePanel and dock it inside the form.
Completed
Last Updated: 07 May 2015 14:43 by ADMIN
To reproduce:
- Create blank WinForms RadForm Application.
- Set WindowState property to Maximized.
- Add RadGroupBox to the form. Set equal space on all sides.
- Anchor the group box to all sides.
- Launch application - spacing around outside of group box is incorrect.
-  Restore form to normal size - spacing around group box is incorrect.

Workaround:
radGroupBox1.Dock = DockStyle.Fill;
radGroupBox1.GroupBoxElement.Margin = new Padding(20);
Completed
Last Updated: 20 Mar 2015 13:49 by ADMIN
To reproduce:
public partial class Form1 : RadForm
{
    public Form1()
    {
        InitializeComponent();
        this.IsMdiContainer = true;
    }

    private void radButton1_Click(object sender, EventArgs e)
    {
        RadForm childForm = new RadForm();
      
        childForm.Text = "MDI Child " + DateTime.Now.ToShortTimeString();
        childForm.MdiParent = this;
        childForm.WindowState = FormWindowState.Maximized;
        childForm.Show();
    }
}
Completed
Last Updated: 14 Apr 2016 12:47 by ADMIN
To reproduce:
- Create new project.
- Make the default  form to inherit RadForm.
- Start the application and maximize the form.
- You will notice that a few pixels are displayed on the right monitor as well.

Workaround:
var screen = System.Windows.Forms.Screen.PrimaryScreen.Bounds;
this.MaximumSize = new Size(screen.Width, screen.Height);

Second Workaround:

public Form1()
{
    InitializeComponent(); 

    this.SizeChanged += Form1_SizeChanged;
}
 
private void Form1_SizeChanged(object sender, EventArgs e)
{
    if (this.WindowState == FormWindowState.Maximized)
    {
        this.Region = null;
    }
}
Completed
Last Updated: 18 Feb 2015 16:11 by ADMIN