- 1 year ago
Box with two lines appears on System.Windows.Window
If a box with two lines appears on a System.Windows.Window
, it is likely that the ShowInTaskbar
property has been set to false
.
When the ShowInTaskbar
property of a Window
is set to false
, a small box with two lines is displayed in place of the taskbar button for that window. This behavior is by design, and is intended to indicate to the user that the window is hidden from the taskbar.
To resolve this issue, you can either set the ShowInTaskbar
property to true
in your code, or set it to true
in the XAML markup for your Window
by adding the following attribute to the Window
element:
xamlShowInTaskbar="True"
Alternatively, you may want to consider whether hiding the window from the taskbar is really necessary for your application. If not, you can simply remove the code that sets the ShowInTaskbar
property to false
.