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.
Unplanned
Last Updated: 29 Mar 2016 14:18 by ADMIN
To reproduce:

public Form1()
{
    InitializeComponent();
    this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
}

Although the user is not allowed to resize the form from the form's borders, it is possible to do it by the context menu.

Workaround:

[DllImport("user32.dll")]
static extern bool EnableMenuItem(IntPtr hMenu, uint uIDEnableItem, uint uEnable);

internal const UInt32 MF_DISABLED = 0x00000002;

internal const UInt32 SC_SIZE = 0xF000;

internal const UInt32 WM_INITMENUPOPUP = 0x0117;

protected override void WndProc(ref Message m)
{
    if (m.Msg == WM_INITMENUPOPUP && (((int)m.LParam & 0x10000) != 0))
    {
        EnableMenuItem(m.WParam, SC_SIZE, MF_DISABLED);
    }

    base.WndProc(ref m);
}
Declined
Last Updated: 19 Feb 2016 09:41 by ADMIN
Created by: Christopher
Comments: 1
Category: Form
Type: Bug Report
0
My company is in the process of moving to windows 10 and we have a handful of custom systems that have to be migrated. I was told to "Just make them work". One of those is a tool that was written in 2008 using all Telerik controls. This system was last updated in 2012 to run on windows 7. We have plans to move the functionality to a Universal App however, we have bigger fish to fry. here is a list of all the bugs we encountered so far:

Forms with tons of controls(170 in my case) take forever to Initialize(> 60 seconds) especially the RadDateTimePicker;

The UI freezes until the InitializeComponent method  completes. 

The forms occasionally throws timeout errors waiting on a Com Handoff for more then 60 seconds.

There is no databinding going on and there is no functionality tied to the initialization or loading of the forms in an MDI. Only Large forms have this problem.

Any form that executes the following code does not load:
this.RootElement.ApplyShapeToControl = true;




Declined
Last Updated: 19 Jan 2016 09:28 by ADMIN
To reproduce:
- Add a menu item with a specific mnemonic key to a form.
- Add child form with a button that has the same mnemonic key.
- Start the application hold Alt and press the mnemonic key.
- The menu item is executed instaed of the
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);
}
Unplanned
Last Updated: 29 Mar 2016 14:18 by ADMIN
To reproduce:
Use the following method to add a form with a textbox to a panel:
Private Sub AddPage(ByRef f As Form)
    Try
        pnlScreenContainer.SuspendUpdate()
        f.TopLevel = False
        f.Visible = False
        f.Dock = DockStyle.Fill
        pnlScreenContainer.Controls.Add(f)
        f.Visible = True
        f.BringToFront()
        f.FormBorderStyle = Windows.Forms.FormBorderStyle.None
        f.Show()

        f.Activate()
    Catch
    End Try
    pnlScreenContainer.ResumeUpdate()
End Sub

Workaround:
- Use RadTextBoxControl instead.

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.
Unplanned
Last Updated: 29 Mar 2016 14:18 by ADMIN
To reproduce: add a RadForm and start the application.

Workaround:
public partial class Form1 : RadForm
{
    public Form1()
    {
        InitializeComponent();
        
    }

    protected override void OnLoad(Size desiredSize)
    {
        this.ElementTree.InitializeRootElement();
        this.RootElement.ApplyShapeToControl = false;
        base.OnLoad(desiredSize);
    }

    protected override void OnLoad(EventArgs e)
    {
        base.OnLoad(e);
        this.RootElement.ApplyShapeToControl = true;
    }
}
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);
}
Unplanned
Last Updated: 17 Feb 2017 13:34 by Vladimir
How to reproduce: 
public partial class Form1 : Form
{
    public Form1()
    {
        InitializeComponent();

        this.IsMdiContainer = true;
        this.Load += Form1_Load;
    }

    private void Form1_Load(object sender, EventArgs e)
    {
        RadForm form = new RadForm();
        form.Text = "MDI Child 1";
        form.MdiParent = this;
        form.Show();
    }

    private void radButton1_Click(object sender, EventArgs e)
    {
        RadForm activeChild = this.ActiveMdiChild as RadForm;
        if (activeChild == null)
        {
            MessageBox.Show("no active form child found!");
            return;
        }
        else
        {
            SaveAsBitmap(activeChild, activeChild + ".Jpeg");
            MessageBox.Show("Screen Captured successfully.");
        }
    }

    public void SaveAsBitmap(Form form, string fileName)
    {
        SaveFileDialog dialog = new SaveFileDialog();
        dialog.Filter = "JPeg Image|*.jpg|Bitmap Image|*.bmp|Gif Image|*.gif";
        if (dialog.ShowDialog() == DialogResult.OK)
        {
            Bitmap bmp = new Bitmap(form.Width, form.Height);
            form.DrawToBitmap(bmp, new Rectangle(0, 0, form.Width, form.Height));
            bmp.Save(dialog.FileName, ImageFormat.Jpeg);
        }
    }
}

Workaround:

public partial class Form1 : Form
{
    public Form1()
    {
        InitializeComponent();

        this.IsMdiContainer = true;
        this.Load += Form1_Load;
    }

    private void Form1_Load(object sender, EventArgs e)
    {
        RadForm form = new RadForm();
        form.Text = "MDI Child 1";
        form.MdiParent = this;
        form.Show();
    }

    private void radButton1_Click(object sender, EventArgs e)
    {
        RadForm activeChild = this.ActiveMdiChild as RadForm;
        if (activeChild == null)
        {
            MessageBox.Show("no active form child found!");
            return;
        }
        else
        {
            SaveAsBitmap(activeChild, activeChild + ".Jpeg");
            MessageBox.Show("Screen Captured successfully.");
        }
    }

    public void SaveAsBitmap(Form form, string fileName)
    {
        Bitmap bmpScreenshot = new Bitmap(form.Bounds.Width, form.Bounds.Height, PixelFormat.Format32bppArgb);
        Graphics gfxScreenshot = Graphics.FromImage(bmpScreenshot);
        Point pt = form.Parent.PointToScreen(form.Location);
        gfxScreenshot.CopyFromScreen(pt.X, pt.Y, 0, 0, form.Bounds.Size, CopyPixelOperation.SourceCopy);
        SaveFileDialog saveImageDialog = new SaveFileDialog();
        saveImageDialog.Title = "Select output file:";
        saveImageDialog.Filter = "JPeg Image|*.jpg|Bitmap Image|*.bmp|Gif Image|*.gif";
        if (saveImageDialog.ShowDialog() == DialogResult.OK)
        {
            bmpScreenshot.Save(saveImageDialog.FileName, ImageFormat.Png);
        }
    }
}
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.

Unplanned
Last Updated: 29 Mar 2016 14:16 by ADMIN
To reproduce:
- Add RadMenu to a panel which is docked to the top.
- Add an MDI child and maximize it.
- You will notice that there is one more set of form buttons visible.

Workaround:
- Leave the menu outside of the panel.
Unplanned
Last Updated: 29 Mar 2016 14:16 by ADMIN
To reproduce: 
- Set the MaximizedBounds property so the form takes the entire right part of the screen, the change the windows state at runtime:
private void radButton1_Click(object sender, EventArgs e)
{
    setFormMaximizedBounds(200);
}

private void radButton2_Click(object sender, EventArgs e)
{
    setFormMaximizedBounds(-1);
}
private void setFormMaximizedBounds(int distance)
{
    if (distance >= 0)
    {
        var ownerScreen = Screen.FromControl(this);
        var workingArea = ownerScreen.WorkingArea;
        var x = workingArea.X + distance;
        var y = workingArea.Y;
        var w = workingArea.Width - distance;
        var h = workingArea.Height;
        this.MaximizedBounds = new Rectangle(x, y, w, h);
    }
    else
    {
        this.MaximizedBounds = new Rectangle(0, 0, 0, 0);
    }

    if (this.WindowState == FormWindowState.Maximized)
    {
        this.WindowState = FormWindowState.Normal;
        this.WindowState = FormWindowState.Maximized;
    }
}

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.
Unplanned
Last Updated: 29 Mar 2016 14:16 by ADMIN
To reproduce: use the following code snippet:

public Form1()
{
    InitializeComponent();

    this.radDropDownList1.SelectedIndexChanged+=radDropDownList1_SelectedIndexChanged;
    this.radDropDownList1.Items.Add("TelerikMetro");
    this.radDropDownList1.Items.Add("Windows8");
    this.radDropDownList1.Items.Add("VisualStudio2012Dark");

    this.radDropDownList1.SelectedIndex = 1;

    this.SizeChanged+=Form1_SizeChanged;
}

private void radDropDownList1_SelectedIndexChanged(object sender, Telerik.WinControls.UI.Data.PositionChangedEventArgs e)
{
    ThemeResolutionService.ApplicationThemeName = this.radDropDownList1.Text;
}

1. Use two monitors and decrease the screen resolution to the main monitor.
2. Run the application from the first monitor and move the form to the second monitor.
3. Resize the form on a way to increase the form's height to be greater than the height of the screen resolution of the main monitor.
4. Change the theme. You will notice that that form is resized.

Workaround:

public Form1()
{
    InitializeComponent();

    this.radDropDownList1.SelectedIndexChanged += radDropDownList1_SelectedIndexChanged;
    this.radDropDownList1.Items.Add("TelerikMetro");
    this.radDropDownList1.Items.Add("Windows8");
    this.radDropDownList1.Items.Add("VisualStudio2012Dark");

    this.radDropDownList1.SelectedIndex = 1;

    this.SizeChanged += Form1_SizeChanged;
}

private void Form1_SizeChanged(object sender, EventArgs e)
{
    if (fSize != Size.Empty)
    {
        this.SizeChanged-= Form1_SizeChanged;
        this.Size = fSize;
        
        this.SizeChanged += Form1_SizeChanged;
    }
}

Size fSize = Size.Empty;

private void radDropDownList1_SelectedIndexChanged(object sender, Telerik.WinControls.UI.Data.PositionChangedEventArgs e)
{
    fSize = this.Size;
    ThemeResolutionService.ApplicationThemeName = this.radDropDownList1.Text;
    fSize=Size.Empty;
}
Unplanned
Last Updated: 29 Mar 2016 14:15 by ADMIN
If you have an MDI form with controls anchored to bottom-left, and if the form is shown the following way:

Form form = new ChildForm()
form.MdiParent = this;
form.Show();

private void ChildForm_Load(object sender, EventArgs e)
{
         this.ThemeName = "Office2007Black";
}

the anchored controls will be misplaced.

WORKAROUND:

either set the parent after show:
Form form = new ChildForm()
form.Show();
form.MdiParent = this;

or do not use the Load event to apply theme - use the constructor or the Shown event:

public ChildForm()
{ 
         InitializeComponent();
         this.ThemeName = "Office2007Black";
}
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;
Unplanned
Last Updated: 29 Mar 2016 13:37 by ADMIN
To reproduce:
- Add form and set its AutoScroll property to true. add some controls so the scrollbars appear.
- Dock the form in a smaller window as a MDI child.

Workaround -  Use scrollable panel.
Unplanned
Last Updated: 29 Mar 2016 13:36 by ADMIN
When you have a RadPageViewPage with a TableLayoutPanel inside a RadForm, by changing the theme the TableLayoutPanel is shrinking.

Pleas find attached a sample project.

Workaround: use a ShapedForm instead of RadForm/RadRibbonForm.