You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
92 lines
3.9 KiB
92 lines
3.9 KiB
<Window x:Class="WpfNoticeMsg.NoticeMessage"
|
|
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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:local="clr-namespace:WpfNoticeMsg"
|
|
mc:Ignorable="d"
|
|
AllowsTransparency="True"
|
|
WindowStyle="None"
|
|
ResizeMode="NoResize"
|
|
WindowStartupLocation="CenterOwner"
|
|
Background="Transparent"
|
|
Foreground="White"
|
|
Title="NoticeMessage" MinHeight="75" MinWidth="350">
|
|
|
|
|
|
<WindowChrome.WindowChrome>
|
|
<WindowChrome GlassFrameThickness="-1" CaptionHeight="2"/>
|
|
</WindowChrome.WindowChrome>
|
|
|
|
|
|
<Window.Style>
|
|
<Style TargetType="{x:Type Window}">
|
|
<Setter Property="Background" Value="Transparent"></Setter>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type Window}">
|
|
<Border BorderBrush="#D7D7D7"
|
|
BorderThickness="1"
|
|
CornerRadius="6"
|
|
x:Name="WindowBorder">
|
|
<Border.Background>
|
|
<SolidColorBrush Opacity="0.6" Color="Black"></SolidColorBrush>
|
|
</Border.Background>
|
|
|
|
|
|
<Grid x:Name="LayoutRoot"
|
|
Background="{TemplateBinding Background}">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
<Grid x:Name="WindowTitlePanel"
|
|
Background="{TemplateBinding BorderBrush}"
|
|
Margin="0,-1,0,0">
|
|
|
|
<ContentPresenter Content="{TemplateBinding Tag}"></ContentPresenter>
|
|
</Grid>
|
|
<AdornerDecorator Grid.Row="1"
|
|
KeyboardNavigation.IsTabStop="False">
|
|
<ContentPresenter Content="{TemplateBinding Content}"
|
|
x:Name="MainContentPresenter"
|
|
KeyboardNavigation.TabNavigation="Cycle" />
|
|
</AdornerDecorator>
|
|
|
|
</Grid>
|
|
</Border>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
</Window.Style>
|
|
|
|
<Window.Tag>
|
|
<Border Padding="5">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition></ColumnDefinition>
|
|
<ColumnDefinition></ColumnDefinition>
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock Text="提示" FontSize="14" Padding="20 5" x:Name="txt_Title"></TextBlock>
|
|
|
|
<Button Padding="10" Grid.Column="1" HorizontalAlignment="Right" Name="close" Click="close_Click">
|
|
<Button.Template>
|
|
<ControlTemplate TargetType="Button">
|
|
<Border Padding="{TemplateBinding Padding}">
|
|
<Border.Background>
|
|
<SolidColorBrush Color="White" Opacity="0.01"></SolidColorBrush>
|
|
</Border.Background>
|
|
<Path Data="M0 0 10 10 M5 5 10 0 M5 5 0 10" Stroke="White" ></Path>
|
|
</Border>
|
|
</ControlTemplate>
|
|
</Button.Template>
|
|
</Button>
|
|
</Grid>
|
|
</Border>
|
|
|
|
</Window.Tag>
|
|
<Grid x:Name="grid" >
|
|
<TextBlock Margin="20 0 20 15" VerticalAlignment="Center" HorizontalAlignment="Center" x:Name="txtMsg"></TextBlock>
|
|
</Grid>
|
|
</Window>
|
|
|