mirror of https://github.com/leiurayer/downkyi
parent
588599e1cf
commit
76c968ac39
@ -0,0 +1,144 @@
|
||||
<UserControl
|
||||
x:Class="DownKyi.Views.Dialogs.ViewAlertDialog"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
||||
xmlns:prism="http://prismlibrary.com/"
|
||||
prism:ViewModelLocator.AutoWireViewModel="True">
|
||||
<prism:Dialog.WindowStyle>
|
||||
<Style TargetType="Window">
|
||||
<Setter Property="prism:Dialog.WindowStartupLocation" Value="CenterOwner" />
|
||||
<Setter Property="ResizeMode" Value="NoResize" />
|
||||
<Setter Property="ShowInTaskbar" Value="False" />
|
||||
<Setter Property="SizeToContent" Value="WidthAndHeight" />
|
||||
<Setter Property="WindowStyle" Value="None" />
|
||||
</Style>
|
||||
</prism:Dialog.WindowStyle>
|
||||
|
||||
<Border BorderBrush="{DynamicResource BrushWindowBorder}" BorderThickness="1,1,0.6,0.6">
|
||||
<Grid Background="{DynamicResource BrushBackground}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="40" />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid
|
||||
Grid.Row="0"
|
||||
Background="{DynamicResource BrushBackgroundGreyTranslucent3}"
|
||||
KeyboardNavigation.TabNavigation="None">
|
||||
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition Width="50" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="50" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<StackPanel
|
||||
Grid.Column="0"
|
||||
Margin="10,0"
|
||||
VerticalAlignment="Center"
|
||||
Orientation="Horizontal">
|
||||
<ContentControl Margin="0,0,10,0">
|
||||
<Path
|
||||
Width="{Binding Image.Width}"
|
||||
Height="{Binding Image.Height}"
|
||||
Data="{Binding Image.Data}"
|
||||
Fill="{Binding Image.Fill}"
|
||||
Stretch="Uniform" />
|
||||
<ContentControl.Style>
|
||||
<Style TargetType="{x:Type ContentControl}">
|
||||
<Setter Property="Visibility" Value="Visible" />
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding Image}" Value="{x:Null}">
|
||||
<Setter Property="Visibility" Value="Collapsed" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</ContentControl.Style>
|
||||
</ContentControl>
|
||||
|
||||
<TextBlock
|
||||
VerticalAlignment="Center"
|
||||
FontSize="14"
|
||||
Foreground="{DynamicResource BrushCaptionForeground}"
|
||||
Text="{Binding Title}" />
|
||||
</StackPanel>
|
||||
|
||||
<Button
|
||||
Grid.Column="4"
|
||||
Command="{Binding CloseCommand}"
|
||||
Style="{StaticResource CloseBtnStyle}"
|
||||
ToolTip="{DynamicResource Close}">
|
||||
<Path
|
||||
Width="{Binding CloseIcon.Width}"
|
||||
Height="{Binding CloseIcon.Height}"
|
||||
Data="{Binding CloseIcon.Data}"
|
||||
Fill="{Binding CloseIcon.Fill}"
|
||||
Stretch="UniformToFill" />
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="MouseEnter">
|
||||
<i:InvokeCommandAction Command="{Binding CloseEnterCommand}" />
|
||||
</i:EventTrigger>
|
||||
<i:EventTrigger EventName="MouseLeave">
|
||||
<i:InvokeCommandAction Command="{Binding CloseLeaveCommand}" />
|
||||
</i:EventTrigger>
|
||||
<i:EventTrigger EventName="LostMouseCapture">
|
||||
<i:InvokeCommandAction Command="{Binding CloseLeaveCommand}" />
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Row="1" Margin="15,10,15,20">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock
|
||||
Grid.Row="0"
|
||||
MaxWidth="500"
|
||||
MaxHeight="180"
|
||||
Margin="0,10,0,30"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="14"
|
||||
Foreground="{DynamicResource BrushTextDark}"
|
||||
Text="{Binding Message}"
|
||||
TextTrimming="CharacterEllipsis"
|
||||
TextWrapping="WrapWithOverflow" />
|
||||
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition MinWidth="100" />
|
||||
<ColumnDefinition MinWidth="100" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button
|
||||
Grid.Column="0"
|
||||
Width="75"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Bottom"
|
||||
Command="{Binding AllowCommand}"
|
||||
Content="{DynamicResource Allow}"
|
||||
FontSize="12"
|
||||
Foreground="{DynamicResource BrushText}"
|
||||
Style="{StaticResource BtnStyle}" />
|
||||
|
||||
<Button
|
||||
Grid.Column="1"
|
||||
Width="75"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Bottom"
|
||||
Command="{Binding CloseCommand}"
|
||||
Content="{DynamicResource Cancel}"
|
||||
FontSize="12"
|
||||
Foreground="{DynamicResource BrushText}"
|
||||
Style="{StaticResource BtnStyle}" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
</UserControl>
|
Loading…
Reference in new issue