| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213 |
- <Window x:Class="Muchinfo.MTPClient.Infrastructure.MessageBox.NewMessageBox"
- 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:i="http://schemas.microsoft.com/expression/2010/interactivity"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:resource="clr-namespace:Muchinfo.MTPClient.Resources;assembly=Client.Resources"
- xmlns:windows="clr-namespace:Muchinfo.WPF.Controls.Windows;assembly=Client.WPF.Controls"
- xmlns:windows1="clr-namespace:Muchinfo.MTPClient.Infrastructure.Windows"
- Closed="NewMessageBox_OnClosed"
- ShowInTaskbar="False"
- Style="{DynamicResource MessageDialogStyle}"
- WindowStartupLocation="CenterOwner"
- mc:Ignorable="d">
- <Window.Resources>
- <Style x:Key="MessageDialogCloseButtonStyle" TargetType="{x:Type Button}">
- <Setter Property="BorderThickness" Value="0" />
- <Setter Property="Padding" Value="4" />
- <Setter Property="Height" Value="20" />
- <Setter Property="Width" Value="20" />
- <Setter Property="Foreground" Value="{DynamicResource MessageDialogCloseButtonBackground}" />
- <Setter Property="HorizontalContentAlignment" Value="Center" />
- <Setter Property="VerticalContentAlignment" Value="Center" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type Button}">
- <Border x:Name="ContentContainer"
- CornerRadius="2"
- Padding="{TemplateBinding Padding}">
- <Path Data="M0.5,0.5 L19.5,19.5 M19.5,0.5 L0.5,19.5"
- Stretch="Fill"
- Stroke="{TemplateBinding Foreground}"
- StrokeThickness="2" />
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsPressed" Value="true">
- <Setter TargetName="ContentContainer" Property="Background" Value="{DynamicResource MessageDialogCloseButtonMouseOverBrush}" />
- </Trigger>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter TargetName="ContentContainer" Property="Background" Value="{DynamicResource MessageDialogCloseButtonMouseOverBrush}" />
- </Trigger>
- <Trigger Property="IsFocused" Value="True">
- <Setter TargetName="ContentContainer" Property="Background" Value="{DynamicResource MessageDialogCloseButtonMouseOverBrush}" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style x:Key="MessageDialogStyle" TargetType="{x:Type Window}">
- <Setter Property="AllowsTransparency" Value="True" />
- <Setter Property="Background" Value="Transparent" />
- <Setter Property="FontFamily" Value="Simsun, Microsoft YaHei" />
- <Setter Property="Foreground" Value="{DynamicResource MessageDialogContnetForeground}" />
- <Setter Property="FontSize" Value="{DynamicResource MuchinfoFontSize_S}" />
- <Setter Property="ResizeMode" Value="NoResize" />
- <Setter Property="WindowStyle" Value="None" />
- <Setter Property="SnapsToDevicePixels" Value="True" />
- <Setter Property="TextOptions.TextFormattingMode" Value="Display" />
- <Setter Property="Width" Value="429" />
- <Setter Property="Height" Value="249" />
- <Setter Property="ShowInTaskbar" Value="True" />
- <Setter Property="BorderThickness" Value="1" />
- <Setter Property="BorderBrush" Value="{DynamicResource MessageDialogBorderBrush}" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type Window}">
- <Grid Margin="10">
- <!--
- <Rectangle RadiusX="2" RadiusY="2">
- <Rectangle.Effect>
- <DropShadowEffect BlurRadius="10" ShadowDepth="0" />
- </Rectangle.Effect>
- </Rectangle>
- -->
- <Rectangle Fill="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"
- RadiusX="2"
- RadiusY="2">
- <Rectangle.Effect>
- <DropShadowEffect BlurRadius="10" ShadowDepth="0" />
- </Rectangle.Effect>
- </Rectangle>
- <Border Background="{DynamicResource MessageDialogBackground}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}"
- CornerRadius="2"
- Padding="{TemplateBinding Margin}"
- SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="47" />
- <RowDefinition Height="1" />
- <RowDefinition Height="1" />
- <RowDefinition Height="*" />
- </Grid.RowDefinitions>
- <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
- <Border x:Name="brdTitle"
- Margin="0,5,0,0"
- HorizontalAlignment="Stretch"
- VerticalAlignment="Stretch"
- Background="Transparent">
- <TextBlock HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="{DynamicResource MuchinfoFontSize_XL}"
- FontWeight="Bold"
- Foreground="{DynamicResource MessageDialogTitleForeground}"
- Text="{Binding Title,
- RelativeSource={RelativeSource FindAncestor,
- AncestorType={x:Type Window}}}" />
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="MouseMove">
- <i:InvokeCommandAction Command="{x:Static windows1:DialogWindowCommands.DragMove}" CommandParameter="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}" />
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </Border>
- <Button x:Name="btnClose"
- Width="20"
- Margin="10,2"
- HorizontalAlignment="Right"
- Command="{x:Static windows1:DialogWindowCommands.Close}"
- CommandParameter="{Binding RelativeSource={RelativeSource FindAncestor,
- AncestorType={x:Type Window}}}"
- IsCancel="True"
- Padding="2"
- Style="{DynamicResource MessageDialogCloseButtonStyle}" />
- </Grid>
- <Separator Grid.Row="1"
- Margin="20,0"
- VerticalAlignment="Bottom"
- Panel.ZIndex="10"
- BorderBrush="{DynamicResource MessageDialogSeparatorTop}"
- Style="{DynamicResource ThinSeparatorStyle}" />
- <Separator Grid.Row="2"
- Margin="20,0"
- VerticalAlignment="Bottom"
- Panel.ZIndex="10"
- BorderBrush="{DynamicResource MessageDialogSeparatorBottom}"
- Style="{DynamicResource ThinSeparatorStyle}" />
- <ContentPresenter Grid.Row="3" />
- </Grid>
- </Border>
- </Grid>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- </Window.Resources>
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="*" />
- <RowDefinition Height="Auto" />
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="2*" />
- </Grid.ColumnDefinitions>
- <Image x:Name="MessageBoxImageButton"
- Grid.Row="0"
- Grid.Column="0"
- Width="50"
- Height="50"
- Margin="40,5,20,5"
- VerticalAlignment="Center"
- Source="{DynamicResource MessageBoxInformation}" />
- <TextBlock x:Name="MessageText"
- Grid.Row="0"
- Grid.Column="1"
- MaxHeight="100"
- Margin="00,5,40,5"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- Foreground="{DynamicResource MessageDialogContnetForeground}"
- ScrollViewer.VerticalScrollBarVisibility="Auto"
- Text="fdsfasfafasfdasfdsfasfasfsdafjdkslafkjsald;fjkdsa;f;lksdafjs;aldjhkghjdklfg;sdjfdsa;lkfjdsa;lfdasfjasd;lfkjsadfjsad;lkfjasd;lfkjsadl;fkasdfkdsjf;lasdkfsajfl;ksfj;saldfksdal;fksdafjsadklfjdslkfsdalfkjsadfasd;lfksadflkskadfjlsk;fsdfklgfjkdghjdklfk;lasfdsfasfafasfdasfdsfasfasfsdafjdkslafkjsald;fjkdsa;f;lksdafjs;aldjhkghjdklfg;sdjfdsa;lkfjdsa;lfdasfjasd;lfkjsadfjsad;lkfjasd;lfkjsadl;fkasdfkdsjf;lasdkfsajfl;ksfj;saldfksdal;fksdafjsadklfjdslkfsdalfkjsadfasd;lfksadflkskadfjlsk;fsdfklgfjkdghjdklfk;lasffasf"
- TextWrapping="Wrap" />
- <StackPanel Grid.Row="1"
- Grid.Column="0"
- Grid.ColumnSpan="2"
- Margin="0,5,0,20"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Orientation="Horizontal">
- <Button x:Name="btnOK"
- Width="100"
- Height="30"
- Background="{DynamicResource MessageDialogButtonBackground}"
- BorderBrush="{DynamicResource MessageDialogButtonBorderBrush}"
- Content="{x:Static resource:Client_Resource.Button_Ok}"
- Foreground="{DynamicResource MessageDialogButtonForeground}"
- KeyUp="BtnOK_OnKeyUp"
- PreviewMouseLeftButtonUp="BtnOK_OnMouseDown"
- Style="{DynamicResource ButtonWithBorderStyle}"
- Visibility="Visible" />
- <Button Name="btnCancel"
- Width="100"
- Height="30"
- Margin="20,0,0,0"
- Background="{DynamicResource MessageDialogButtonBackground}"
- BorderBrush="{DynamicResource MessageDialogButtonBorderBrush}"
- Click="BtnCancel_OnClick"
- Content="{x:Static resource:Client_Resource.Button_Cancel}"
- Foreground="{DynamicResource MessageDialogButtonForeground}"
- Style="{DynamicResource ButtonWithBorderStyle}" />
- </StackPanel>
- </Grid>
- </Window>
|