DuplicateProfileDialog.xaml 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <Window x:Class="ClashDotNetFramework.Dialogs.DuplicateProfileDialog"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:local="clr-namespace:ClashDotNetFramework.Dialogs"
  7. xmlns:TxtBox="clr-namespace:WatermarkControlsLib.Controls;assembly=WatermarkControlsLib"
  8. mc:Ignorable="d" FontSize="14" KeyDown="Window_KeyDown"
  9. Title="DuplicateProfileDialog" Background="{DynamicResource DialogBackground}"
  10. Height="210" Width="380" MinHeight="210" MinWidth="380"
  11. WindowStyle="None" ResizeMode="NoResize" AllowsTransparency="True"
  12. WindowStartupLocation="CenterOwner"
  13. ShowInTaskbar="False">
  14. <Window.Resources>
  15. <Style x:Key="TextBlockStyle" TargetType="TextBlock">
  16. <Setter Property="Foreground" Value="{DynamicResource NormalTextForeground}"/>
  17. <Setter Property="FontSize" Value="14"/>
  18. </Style>
  19. <Style x:Key="TextBoxStyle" TargetType="TextBox">
  20. <Setter Property="BorderBrush" Value="{DynamicResource TextBoxBorderBrush}"/>
  21. <Setter Property="Background" Value="{DynamicResource TextBoxBackground}"/>
  22. <Setter Property="Foreground" Value="{DynamicResource NormalTextForeground}"/>
  23. <Setter Property="HorizontalAlignment" Value="Stretch"/>
  24. <Setter Property="VerticalContentAlignment" Value="Center"/>
  25. <Setter Property="Height" Value="40"/>
  26. </Style>
  27. <Style x:Key="ButtonStyle" TargetType="Button">
  28. <Setter Property="BorderThickness" Value="0"/>
  29. <Setter Property="Foreground" Value="White"/>
  30. <Setter Property="Background" Value="{DynamicResource ButtonBackground}"/>
  31. <Setter Property="Cursor" Value="Hand"/>
  32. <Setter Property="Width" Value="100"/>
  33. <Setter Property="Height" Value="40"/>
  34. <Setter Property="Template">
  35. <Setter.Value>
  36. <ControlTemplate TargetType="Button">
  37. <Border CornerRadius="2" Background="{TemplateBinding Background}">
  38. <ContentPresenter x:Name="ContentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
  39. </Border>
  40. </ControlTemplate>
  41. </Setter.Value>
  42. </Setter>
  43. </Style>
  44. </Window.Resources>
  45. <Grid>
  46. <Grid.RowDefinitions>
  47. <!-- Dialog Title -->
  48. <RowDefinition Height="Auto"/>
  49. <!-- Main Content -->
  50. <RowDefinition/>
  51. </Grid.RowDefinitions>
  52. <!-- Dialog Title -->
  53. <TextBlock
  54. Text="{DynamicResource DuplicateProfile}"
  55. Foreground="{DynamicResource NormalTextForeground}"
  56. FontSize="16"
  57. Margin="20,20,20,0"/>
  58. <!-- Main Content -->
  59. <StackPanel
  60. Grid.Row="1"
  61. Margin="20">
  62. <StackPanel>
  63. <StackPanel>
  64. <TextBlock
  65. Style="{StaticResource TextBlockStyle}"
  66. Text="{DynamicResource Name}"/>
  67. <TxtBox:WatermarkTextBox
  68. Style="{StaticResource TextBoxStyle}"
  69. Margin="0,5,0,0"
  70. x:Name="Name">
  71. <TxtBox:WatermarkTextBox.Watermark>
  72. <TextBlock
  73. Text="{DynamicResource InputNewFileName}"
  74. Foreground="{DynamicResource NormalTextForeground}"
  75. Margin="5,0,0,0"/>
  76. </TxtBox:WatermarkTextBox.Watermark>
  77. </TxtBox:WatermarkTextBox>
  78. </StackPanel>
  79. <StackPanel
  80. Orientation="Horizontal"
  81. Margin="0,20,0,0"
  82. HorizontalAlignment="Center">
  83. <Button
  84. Style="{StaticResource ButtonStyle}"
  85. Content="{DynamicResource Ok}"
  86. Click="OkButton_Click"
  87. Margin="25,0"/>
  88. <Button
  89. Style="{StaticResource ButtonStyle}"
  90. Content="{DynamicResource Cancel}"
  91. Click="CancelButton_Click"
  92. Margin="25,0"/>
  93. </StackPanel>
  94. </StackPanel>
  95. </StackPanel>
  96. </Grid>
  97. </Window>