title | author | date | CreateTime | categories |
---|---|---|---|---|
WPF full-screen transparent window
|
lindexi
|
2019-11-27 09:22:19 +0800
|
2019-11-27 08:48:26 +0800
|
WPF
|
This article tells you how to make a pit full-screen transparent window, transparent and full-screen window in WPF
Use the following code can be made a transparent window fullscreen
public MainWindow()
{
InitializeComponent();
AllowsTransparency = true;
WindowStyle = WindowStyle.None;
WindowState = WindowState.Maximized;
Background = Brushes.Transparent;
Topmost = true;
}
WPF transparent window in the background will be added into the memory, try the above program is run 2K screen, you will see probably need 70M of memory. If a larger screen resolution, you'll find the mouse to move very slowly, see [translation] footprint on WPF transparent window
Also find a window screen and actually have a pixel, by setting ResizeMode="NoResize"
can be resolved, because this one pixel is used to drag a window
In addition, the set ResizeMode="NoResize"
can be resolved:
- 17025 touch bug
- Restore window and then maximize the window offset
- Screen switching, window offset