添加项目文件。
This commit is contained in:
46
WPFWCSDemo/Views/CustomComponent/MessageDialog.xaml
Normal file
46
WPFWCSDemo/Views/CustomComponent/MessageDialog.xaml
Normal file
@@ -0,0 +1,46 @@
|
||||
<Window x:Class="WPFWCSDemo.Views.MessageDialog"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:md="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||||
xmlns:local="clr-namespace:WPFWCSDemo.ViewModels.CustomComponent"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="160" d:DesignWidth="270"
|
||||
MaxHeight="200"
|
||||
MaxWidth="300"
|
||||
AllowsTransparency="True"
|
||||
Topmost="True"
|
||||
WindowState="Normal"
|
||||
WindowStyle="None"
|
||||
BorderBrush="BlueViolet"
|
||||
BorderThickness="3"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
Background="GhostWhite"
|
||||
x:Name="messageWindow"
|
||||
>
|
||||
|
||||
<Window.Effect>
|
||||
<DropShadowEffect BlurRadius="20" ShadowDepth="15" Direction="225" Opacity="0.7"/>
|
||||
</Window.Effect>
|
||||
|
||||
<DockPanel>
|
||||
<md:ColorZone x:Name="colorZone" CornerRadius="0" Padding="0" Height="30" md:ElevationAssist.Elevation="Dp4" DockPanel.Dock="Top" Mode="PrimaryMid">
|
||||
<TextBlock Text="{Binding Caption}" VerticalAlignment="Center" Margin="20 0"/>
|
||||
</md:ColorZone>
|
||||
<md:ColorZone Height="6" CornerRadius="0"/>
|
||||
<Grid Margin="10">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock TextWrapping="Wrap" Text="{Binding Content}" Style="{StaticResource MaterialDesignTextBlock}" VerticalAlignment="Center" LineHeight="20" HorizontalAlignment="Center" Padding="30 20 30 0"/>
|
||||
<DockPanel Grid.Row="2" LastChildFill="False" Margin="20,10,20,0">
|
||||
<Button Content="确定" Background="Lavender" Width="100" IsDefault="True" Style="{StaticResource MaterialDesignFlatButton}" Command="{Binding AcceptCommand}"/>
|
||||
<Button Content="取消" Background="Lavender" Width="100" Style="{StaticResource MaterialDesignFlatButton}" DockPanel.Dock="Right" Command="{Binding CancelCommand}" CommandParameter="{Binding MessageDialog}"/>
|
||||
</DockPanel>
|
||||
</Grid>
|
||||
</DockPanel>
|
||||
|
||||
</Window>
|
||||
Reference in New Issue
Block a user