Completed
Last Updated: 02 Mar 2018 09:47 by ADMIN
ADMIN
Dimitar
Created on: 30 Jan 2018 09:19
Category: Form
Type: Bug Report
0
FIX. RadForm - setting the FormBorderStyle property to FixedToolWindow clears the taskbar icon.
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;
}
(Total attached files size should be smaller than 20mb. Allowed extensions: .zip, .rar, .jpg, .png, .gif)
1 comment
ADMIN
Peter
Posted on: 31 Jan 2018 13:16
Tool windows do not display icons. This is why we are hiding the icon when the FormBorderStyle is set to FixedToolWindow.
https://social.msdn.microsoft.com/Forums/vstudio/en-US/f03930d0-62d5-4002-b000-f6c3e19f7c8d/icon-for-fixedtoolwindow?forum=csharpgeneral
https://stackoverflow.com/questions/3117313/net-add-icon-fixed-tool-window

For a similar style, you could set the window style to FixedSingle and set MinimizeBox and MaximizeBox properties to false.
or set ShowIcon to true after setting the FormBorderStyle.
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.ShowIcon = true;