Flow.Launcher/Flow.Launcher.Core/MessageBoxEx.xaml

155 lines
6.2 KiB
Text
Raw Normal View History

2022-11-12 18:27:41 +00:00
<Window
x:Class="Flow.Launcher.Core.MessageBoxEx"
2022-11-12 18:27:41 +00:00
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Flow.Launcher.Core"
2022-11-12 18:27:41 +00:00
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
2022-11-13 09:29:02 +00:00
x:Name="MessageBoxWindow"
Width="420"
Height="Auto"
2024-06-11 04:01:47 +00:00
Background="{DynamicResource PopuBGColor}"
Foreground="{DynamicResource PopupTextColor}"
2022-11-12 18:27:41 +00:00
ResizeMode="NoResize"
2022-11-13 09:29:02 +00:00
SizeToContent="Height"
2022-11-12 18:27:41 +00:00
WindowStartupLocation="CenterScreen"
mc:Ignorable="d">
<WindowChrome.WindowChrome>
<WindowChrome CaptionHeight="32" ResizeBorderThickness="{x:Static SystemParameters.WindowResizeBorderThickness}" />
</WindowChrome.WindowChrome>
<Window.InputBindings>
<KeyBinding Key="Escape" Command="Close" />
</Window.InputBindings>
<Window.CommandBindings>
<CommandBinding Command="Close" Executed="KeyEsc_OnPress" />
2022-11-12 18:27:41 +00:00
</Window.CommandBindings>
<Grid>
<Grid.RowDefinitions>
2022-11-13 09:29:02 +00:00
<RowDefinition Height="Auto" />
2022-11-12 18:27:41 +00:00
<RowDefinition />
2022-11-13 09:29:02 +00:00
<RowDefinition MinHeight="68" />
2022-11-12 18:27:41 +00:00
</Grid.RowDefinitions>
<StackPanel Grid.Row="0">
<StackPanel>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Button
2024-11-24 14:08:50 +00:00
Grid.Column="1"
2022-11-13 09:29:02 +00:00
Click="Button_Cancel"
2022-11-12 18:27:41 +00:00
Style="{StaticResource TitleBarCloseButtonStyle}">
<Path
Width="46"
Height="32"
Data="M 18,11 27,20 M 18,20 27,11"
Stroke="{Binding Path=Foreground, RelativeSource={RelativeSource AncestorType={x:Type Button}}}"
StrokeThickness="1">
<Path.Style>
<Style TargetType="Path">
<Style.Triggers>
<DataTrigger Binding="{Binding Path=IsActive, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}" Value="False">
<Setter Property="Opacity" Value="0.5" />
</DataTrigger>
</Style.Triggers>
</Style>
</Path.Style>
</Path>
</Button>
</Grid>
</StackPanel>
2022-11-13 09:29:02 +00:00
</StackPanel>
2024-11-24 14:12:43 +00:00
<Grid Grid.Row="1" Margin="30 0 30 24">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid Grid.Row="0" Margin="0 0 0 12">
2022-11-13 09:29:02 +00:00
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Image
Name="Img"
Grid.Column="0"
Width="18"
Height="18"
Margin="0 0 10 0"
2022-11-13 09:29:02 +00:00
HorizontalAlignment="Left"
2024-06-11 04:01:47 +00:00
VerticalAlignment="Center"
2022-11-13 16:29:24 +00:00
RenderOptions.BitmapScalingMode="Fant"
Stretch="UniformToFill"
2022-11-13 09:29:02 +00:00
Visibility="Collapsed" />
<TextBlock
x:Name="TitleTextBlock"
Grid.Column="1"
MaxWidth="400"
Margin="0 0 26 0"
2024-06-11 04:01:47 +00:00
VerticalAlignment="Center"
2022-11-13 09:29:02 +00:00
FontFamily="Segoe UI"
FontSize="20"
FontWeight="SemiBold"
TextAlignment="Left"
TextWrapping="Wrap" />
</Grid>
<TextBlock
x:Name="DescTextBlock"
2024-11-24 14:12:43 +00:00
Grid.Row="1"
2022-11-13 09:29:02 +00:00
MaxWidth="400"
2024-06-11 04:01:47 +00:00
Margin="0 0 26 0"
2022-11-13 09:29:02 +00:00
HorizontalAlignment="Stretch"
FontSize="14"
TextAlignment="Left"
TextWrapping="Wrap" />
2024-11-24 14:12:43 +00:00
<TextBlock
x:Name="DescOnlyTextBlock"
Grid.Row="0"
Grid.RowSpan="2"
MaxWidth="400"
Margin="0 0 26 0"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
FontSize="14"
TextAlignment="Left"
TextWrapping="Wrap"
Visibility="Collapsed" />
2024-11-24 14:12:43 +00:00
</Grid>
2022-11-12 18:27:41 +00:00
<Border
2022-11-13 09:29:02 +00:00
Grid.Row="2"
2024-06-11 04:01:47 +00:00
Margin="0 0 0 0"
2022-11-12 18:27:41 +00:00
Background="{DynamicResource PopupButtonAreaBGColor}"
BorderBrush="{DynamicResource PopupButtonAreaBorderColor}"
2024-06-11 04:01:47 +00:00
BorderThickness="0 1 0 0">
2022-11-13 09:29:02 +00:00
<WrapPanel
HorizontalAlignment="Center"
VerticalAlignment="Center"
Orientation="Horizontal">
2022-11-12 18:27:41 +00:00
<Button
x:Name="btnOk"
MinWidth="120"
2024-06-11 04:01:47 +00:00
Margin="5 0 5 0"
2022-11-13 09:29:02 +00:00
Click="Button_Click"
Content="{DynamicResource commonOK}" />
2022-11-12 18:27:41 +00:00
<Button
x:Name="btnYes"
MinWidth="120"
2024-06-11 04:01:47 +00:00
Margin="5 0 5 0"
2022-11-13 09:29:02 +00:00
Click="Button_Click"
Content="{DynamicResource commonYes}" />
2022-11-13 09:29:02 +00:00
<Button
x:Name="btnNo"
MinWidth="120"
2024-06-11 04:01:47 +00:00
Margin="5 0 5 0"
2022-11-13 09:29:02 +00:00
Click="Button_Click"
Content="{DynamicResource commonNo}" />
2022-11-13 09:29:02 +00:00
<Button
x:Name="btnCancel"
MinWidth="120"
2024-06-11 04:01:47 +00:00
Margin="5 0 5 0"
2022-11-13 09:29:02 +00:00
Click="Button_Click"
Content="{DynamicResource commonCancel}" />
2022-11-13 09:29:02 +00:00
</WrapPanel>
2022-11-12 18:27:41 +00:00
</Border>
</Grid>
</Window>