ShowMessage.xaml 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <UserControl x:Class="TeamAAS_VP.Controls.ShowMessage"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
  7. xmlns:system="clr-namespace:System;assembly=mscorlib"
  8. xmlns:local="clr-namespace:TeamAAS_VP.Controls"
  9. xmlns:lex="http://wpflocalizeextension.codeplex.com"
  10. lex:LocalizeDictionary.DesignCulture="zh-CN"
  11. lex:ResxLocalizationProvider.DefaultAssembly="TeamAAS-VP"
  12. lex:ResxLocalizationProvider.DefaultDictionary="Lang"
  13. mc:Ignorable="d"
  14. d:Background="White"
  15. FontFamily="{DynamicResource DefaultFont}">
  16. <Grid Margin="0"
  17. MinWidth="300"
  18. MinHeight="200" >
  19. <Grid.RowDefinitions>
  20. <RowDefinition Height="auto"/>
  21. <RowDefinition Height="*"/>
  22. <RowDefinition Height="auto"/>
  23. </Grid.RowDefinitions>
  24. <TextBlock Text="{Binding Title}"
  25. FontSize="16"
  26. VerticalAlignment="Center"
  27. Margin="10,5"
  28. TextWrapping="Wrap"/>
  29. <Border VerticalAlignment="Bottom"
  30. Height="1"
  31. BorderThickness="1"
  32. BorderBrush="Gray" />
  33. <TextBlock Grid.Row="1"
  34. Margin="10,5"
  35. Text="{Binding Message}"
  36. Foreground="Black"
  37. TextAlignment="Center"
  38. FontSize="16"
  39. VerticalAlignment="Center"
  40. HorizontalAlignment="Left"
  41. TextWrapping="Wrap">
  42. </TextBlock>
  43. <StackPanel Grid.Row="2"
  44. Margin="10,10"
  45. Orientation="Horizontal"
  46. HorizontalAlignment="Right">
  47. <Button Command="{x:Static materialDesign:DialogHost.CloseDialogCommand}"
  48. IsDefault="True"
  49. FontSize="16"
  50. Style="{StaticResource MaterialDesignFlatButton}"
  51. Content="{lex:Loc 确定}">
  52. <Button.CommandParameter>
  53. <system:Boolean>True</system:Boolean>
  54. </Button.CommandParameter>
  55. </Button>
  56. <Button Margin="8,0,0,0"
  57. Command="{x:Static materialDesign:DialogHost.CloseDialogCommand}"
  58. IsCancel="True"
  59. FontSize="16"
  60. Visibility="{Binding IsCancel,Converter={StaticResource BooleanToVisibilityConverter}}"
  61. Style="{StaticResource MaterialDesignFlatButton}"
  62. Content="{lex:Loc 取消}">
  63. <Button.CommandParameter>
  64. <system:Boolean>False</system:Boolean>
  65. </Button.CommandParameter>
  66. </Button>
  67. </StackPanel>
  68. </Grid>
  69. </UserControl>