/
githubmirror
/
PowerToys
Обзор
Документация
Войти
/
githubmirror
/
PowerToys
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/modules/Workspaces/WorkspacesLauncherUI/StatusWindow.xaml
103 строки
5 KB
Niels Laute
[Workspaces] Move to WPF Fluent and tweak overall UX (#46172)
21 май 2026, 08:54
Не верифицирован
21 май 2026, 08:54
52bf042
Код
Авторство
О чём код?
<Window x:Class="WorkspacesLauncherUI.StatusWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:converters="clr-namespace:WorkspacesLauncherUI.Converters" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:WorkspacesLauncherUI" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:props="clr-namespace:WorkspacesLauncherUI.Properties" Title="{x:Static props:Resources.LauncherWindowTitle}" Width="360" Height="340" BorderBrush="Red" BorderThickness="4" Closing="Window_Closing" ResizeMode="NoResize" Topmost="True" WindowStartupLocation="CenterScreen" mc:Ignorable="d"> <Window.Resources> <BooleanToVisibilityConverter x:Key="BoolToVis" /> <converters:BooleanToInvertedVisibilityConverter x:Key="BooleanToInvertedVisibilityConverter" /> </Window.Resources> <Grid Margin="4" Background="Transparent"> <Grid.RowDefinitions> <RowDefinition Height="1*" /> <RowDefinition Height="Auto" /> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="1*" /> <ColumnDefinition Width="1*" /> </Grid.ColumnDefinitions> <ScrollViewer Grid.ColumnSpan="2"> <StackPanel> <ItemsControl ItemsSource="{Binding AppsListed, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"> <ItemsControl.ItemTemplate> <DataTemplate> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="auto" /> <ColumnDefinition Width="1*" /> <ColumnDefinition Width="auto" /> </Grid.ColumnDefinitions> <Image Width="20" Height="20" Margin="10" HorizontalAlignment="Center" VerticalAlignment="Center" Source="{Binding IconBitmapImage}" /> <TextBlock Grid.Column="1" VerticalAlignment="Center" Foreground="{DynamicResource TextFillColorPrimaryBrush}" Text="{Binding Name, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}" /> <ProgressBar Grid.Column="2" Width="20" Height="20" Margin="10" HorizontalAlignment="Center" VerticalAlignment="Center" IsIndeterminate="True" Visibility="{Binding Loading, Mode=OneWay, Converter={StaticResource BoolToVis}, UpdateSourceTrigger=PropertyChanged}" /> <TextBlock Grid.Column="2" Width="20" Height="20" Margin="10" HorizontalAlignment="Center" VerticalAlignment="Center" FontFamily="{DynamicResource SymbolThemeFontFamily}" FontSize="20" Foreground="{Binding StateColor}" Text="{Binding StateGlyph}" Visibility="{Binding Loading, Mode=OneWay, Converter={StaticResource BooleanToInvertedVisibilityConverter}, UpdateSourceTrigger=PropertyChanged}" /> </Grid> </DataTemplate> </ItemsControl.ItemTemplate> </ItemsControl> </StackPanel> </ScrollViewer> <Button x:Name="CancelButton" Grid.Row="1" Margin="4" HorizontalAlignment="Stretch" AutomationProperties.Name="{x:Static props:Resources.CancelLaunch}" Click="CancelButtonClicked" Content="{x:Static props:Resources.CancelLaunch}" /> <Button x:Name="DismissButton" Grid.Row="1" Grid.Column="1" Margin="4" HorizontalAlignment="Stretch" AutomationProperties.Name="{x:Static props:Resources.Dismiss}" Click="DismissButtonClicked" Content="{x:Static props:Resources.Dismiss}" Style="{DynamicResource AccentButtonStyle}" /> </Grid> </Window>