MessageDialog.xaml 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <hc:Window x:Class="TeamAAS.Dialogs.Dialogs.MessageDialog"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:hc="https://handyorg.github.io/handycontrol"
  5. Title="提示" Width="560" SizeToContent="Height" MaxHeight="620"
  6. ResizeMode="NoResize" WindowStartupLocation="CenterOwner"
  7. ShowInTaskbar="False" Background="{DynamicResource RegionBrush}">
  8. <hc:Window.Resources>
  9. <Style x:Key="IconPath" TargetType="Path">
  10. <Setter Property="Width" Value="36"/>
  11. <Setter Property="Height" Value="36"/>
  12. <Setter Property="Stretch" Value="Uniform"/>
  13. <Setter Property="HorizontalAlignment" Value="Center"/>
  14. <Setter Property="VerticalAlignment" Value="Center"/>
  15. </Style>
  16. </hc:Window.Resources>
  17. <Grid Margin="24,22,24,18">
  18. <Grid.RowDefinitions>
  19. <RowDefinition Height="Auto"/>
  20. <RowDefinition Height="Auto"/>
  21. <RowDefinition Height="Auto"/>
  22. </Grid.RowDefinitions>
  23. <Border Grid.Row="0" Padding="0,0,0,16" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="0,0,0,1">
  24. <StackPanel Orientation="Horizontal">
  25. <Path x:Name="IconDisplay" Style="{StaticResource IconPath}"
  26. Fill="{DynamicResource PrimaryBrush}" Margin="0,0,18,0"
  27. Data="M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,17A1,1 0 0,1 11,16V11A1,1 0 0,1 12,10A1,1 0 0,1 13,11V16A1,1 0 0,1 12,17M12,7.5A1,1 0 0,1 11,6.5A1,1 0 0,1 12,5.5A1,1 0 0,1 13,6.5A1,1 0 0,1 12,7.5Z"/>
  28. <TextBlock x:Name="MessageText" Text="消息内容" FontSize="15" LineHeight="24"
  29. TextWrapping="Wrap" MaxWidth="450" VerticalAlignment="Center"/>
  30. </StackPanel>
  31. </Border>
  32. <Expander x:Name="DetailsExpander" Grid.Row="1" Header="详细信息" Visibility="Collapsed" Margin="0,14,0,0">
  33. <Grid Margin="0,8,0,0">
  34. <Grid.RowDefinitions>
  35. <RowDefinition Height="Auto"/>
  36. <RowDefinition Height="Auto"/>
  37. </Grid.RowDefinitions>
  38. <TextBox x:Name="DetailsText" Grid.Row="0" IsReadOnly="True" TextWrapping="Wrap"
  39. AcceptsReturn="True" MaxHeight="180" Padding="10"
  40. VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled"/>
  41. <Button x:Name="BtnCopyDetails" Grid.Row="1" Content="复制诊断信息"
  42. HorizontalAlignment="Right" Margin="0,8,0,0" Padding="12,4"
  43. Click="BtnCopyDetails_Click"/>
  44. </Grid>
  45. </Expander>
  46. <StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,20,0,0">
  47. <Button x:Name="BtnOK" Content="确定" Width="96" Height="34" Margin="0,0,8,0"
  48. Style="{StaticResource ButtonPrimary}" Click="BtnOK_Click"/>
  49. <Button x:Name="BtnNo" Content="否" Width="96" Height="34" Margin="8,0,0,0"
  50. Visibility="Collapsed" Click="BtnNo_Click"/>
  51. <Button x:Name="BtnCancel" Content="取消" Width="96" Height="34" Margin="8,0,0,0"
  52. Visibility="Collapsed" Click="BtnCancel_Click"/>
  53. </StackPanel>
  54. </Grid>
  55. </hc:Window>