/
githubmirror
/
PowerToys
Обзор
Документация
Войти
/
githubmirror
/
PowerToys
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/modules/cmdpal/Microsoft.CmdPal.UI/MainWindow.xaml
45 строк
2 KB
Mike Griese
CmdPal: add support for compact mode (#48801)
25 июн 2026, 01:35
Не верифицирован
25 июн 2026, 01:35
3331bdf
Код
Авторство
О чём код?
<winuiex:WindowEx x:Class="Microsoft.CmdPal.UI.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:controls="using:Microsoft.CmdPal.UI.Controls" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:pages="using:Microsoft.CmdPal.UI.Pages" xmlns:viewModels="using:Microsoft.CmdPal.UI.ViewModels" xmlns:winuiex="using:WinUIEx" Width="800" Height="480" MinWidth="640" MinHeight="420" Activated="MainWindow_Activated" Closed="MainWindow_Closed" mc:Ignorable="d"> <!-- The whole window is borderless and transparent (see MainWindow.xaml.cs). CmdPalMainControl is the visible "card" — it draws the rounded corners, border, drop shadow, and hosts the SystemBackdropElement that paints Mica / Acrylic / etc. behind the content. --> <controls:CmdPalMainControl x:Name="RootElement"> <controls:CmdPalMainControl.BackgroundLayer> <controls:BlurImageControl HorizontalAlignment="Stretch" VerticalAlignment="Stretch" BlurAmount="{x:Bind ViewModel.BackgroundImageBlurAmount, Mode=OneWay}" ImageBrightness="{x:Bind ViewModel.BackgroundImageBrightness, Mode=OneWay}" ImageOpacity="{x:Bind ViewModel.EffectiveImageOpacity, Mode=OneWay}" ImageSource="{x:Bind ViewModel.BackgroundImageSource, Mode=OneWay}" ImageStretch="{x:Bind ViewModel.BackgroundImageStretch, Mode=OneWay}" IsHitTestVisible="False" IsHoldingEnabled="False" TintColor="{x:Bind ViewModel.BackgroundImageTint, Mode=OneWay}" TintIntensity="{x:Bind ViewModel.BackgroundImageTintIntensity, Mode=OneWay}" Visibility="{x:Bind ViewModel.ShowBackgroundImage, Mode=OneWay}" /> </controls:CmdPalMainControl.BackgroundLayer> <controls:CmdPalMainControl.MainContent> <pages:ShellPage HostWindow="{x:Bind}" /> </controls:CmdPalMainControl.MainContent> </controls:CmdPalMainControl> </winuiex:WindowEx>