mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-02-22 11:09:42 +01:00
Compare commits
6 Commits
shawn/fixP
...
shawn/fixW
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a9585f1d37 | ||
|
|
9ecf1da045 | ||
|
|
62ec8ee50e | ||
|
|
13a6bf1f0b | ||
|
|
b8aa0a6890 | ||
|
|
4de28416be |
@@ -10,7 +10,6 @@
|
||||
IsMaximizable="False"
|
||||
IsMinimizable="False"
|
||||
IsResizable="False"
|
||||
IsShownInSwitchers="False"
|
||||
IsTitleBarVisible="False"
|
||||
mc:Ignorable="d">
|
||||
<winuiex:WindowEx.Backdrop>
|
||||
|
||||
@@ -52,12 +52,23 @@ namespace MeasureToolUI
|
||||
var presenter = _appWindow.Presenter as OverlappedPresenter;
|
||||
presenter.IsAlwaysOnTop = true;
|
||||
this.SetIsAlwaysOnTop(true);
|
||||
this.SetIsShownInSwitchers(false);
|
||||
this.SetIsResizable(false);
|
||||
this.SetIsMinimizable(false);
|
||||
this.SetIsMaximizable(false);
|
||||
IsTitleBarVisible = false;
|
||||
|
||||
try
|
||||
{
|
||||
this.SetIsShownInSwitchers(false);
|
||||
}
|
||||
catch (NotImplementedException)
|
||||
{
|
||||
// WinUI will throw if explorer is not running, safely ignore
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
|
||||
// Remove the caption style from the window style. Windows App SDK 1.6 added it, which made the title bar and borders appear for Measure Tool. This code removes it.
|
||||
var windowStyle = GetWindowLong(hwnd, GWL_STYLE);
|
||||
windowStyle = windowStyle & (~WS_CAPTION);
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
IsMaximizable="False"
|
||||
IsMinimizable="False"
|
||||
IsResizable="False"
|
||||
IsShownInSwitchers="False"
|
||||
IsTitleBarVisible="False"
|
||||
mc:Ignorable="d">
|
||||
<Grid Background="#1A000000">
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.UI.Windowing;
|
||||
using Windows.Graphics;
|
||||
@@ -25,17 +24,6 @@ namespace PowerDisplay.PowerDisplayXAML
|
||||
{
|
||||
InitializeComponent();
|
||||
NumberText.Text = displayText;
|
||||
try
|
||||
{
|
||||
this.SetIsShownInSwitchers(false);
|
||||
}
|
||||
catch (NotImplementedException)
|
||||
{
|
||||
// WinUI will throw if explorer is not running, safely ignore
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
|
||||
// Configure window style
|
||||
ConfigureWindow();
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
IsMaximizable="False"
|
||||
IsMinimizable="False"
|
||||
IsResizable="False"
|
||||
IsShownInSwitchers="False"
|
||||
IsTitleBarVisible="False">
|
||||
<winuiex:WindowEx.SystemBackdrop>
|
||||
<DesktopAcrylicBackdrop />
|
||||
|
||||
@@ -71,10 +71,6 @@ namespace PowerDisplay
|
||||
_hotkeyService.Initialize(this);
|
||||
Logger.LogTrace("MainWindow constructor: HotkeyService initialized");
|
||||
|
||||
Logger.LogTrace("MainWindow constructor: Setting IsShownInSwitchers property");
|
||||
this.SetIsShownInSwitchers(false);
|
||||
Logger.LogTrace("MainWindow constructor: Set IsShownInSwitchers property successfully");
|
||||
|
||||
// Note: ViewModel handles all async initialization internally.
|
||||
// We listen to InitializationCompleted event to know when data is ready.
|
||||
// No duplicate initialization here - single responsibility in ViewModel.
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
IsMaximizable="False"
|
||||
IsMinimizable="False"
|
||||
IsResizable="False"
|
||||
IsShownInSwitchers="False"
|
||||
IsTitleBarVisible="False"
|
||||
mc:Ignorable="d">
|
||||
<winuiEx:WindowEx.Backdrop>
|
||||
|
||||
@@ -305,7 +305,17 @@ public sealed partial class MainWindow : WindowEx, IDisposable
|
||||
return;
|
||||
}
|
||||
|
||||
_appWindow.IsShownInSwitchers = false;
|
||||
try
|
||||
{
|
||||
_appWindow.IsShownInSwitchers = false;
|
||||
}
|
||||
catch (NotImplementedException)
|
||||
{
|
||||
// WinUI Will throw if explorer is not running, safely ignore
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
private bool CloakWindow()
|
||||
|
||||
Reference in New Issue
Block a user