ProfileSettingsDialog.xaml 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <Window x:Class="ClashDotNetFramework.Dialogs.ProfileSettingsDialog"
  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. mc:Ignorable="d" FontSize="14" KeyDown="Window_KeyDown"
  8. Title="ProfileSettingsDialog" Background="{DynamicResource DialogBackground}"
  9. MinHeight="350" MinWidth="350" Height="350" Width="350"
  10. WindowStyle="None" ResizeMode="NoResize" AllowsTransparency="True"
  11. WindowStartupLocation="CenterOwner"
  12. ShowInTaskbar="False">
  13. <Window.Resources>
  14. <Style x:Key="TextBlockStyle" TargetType="TextBlock">
  15. <Setter Property="Foreground" Value="{DynamicResource NormalTextForeground}"/>
  16. <Setter Property="FontSize" Value="14"/>
  17. </Style>
  18. <Style x:Key="TextBoxStyle" TargetType="TextBox">
  19. <Setter Property="Background" Value="{DynamicResource TextBoxBackground}"/>
  20. <Setter Property="BorderBrush" Value="{DynamicResource TextBoxBorderBrush}"/>
  21. <Setter Property="Foreground" Value="{DynamicResource NormalTextForeground}"/>
  22. <Setter Property="HorizontalAlignment" Value="Stretch"/>
  23. <Setter Property="VerticalContentAlignment" Value="Center"/>
  24. <Setter Property="Height" Value="40"/>
  25. </Style>
  26. <Style x:Key="ButtonStyle" TargetType="Button">
  27. <Setter Property="BorderThickness" Value="0"/>
  28. <Setter Property="Foreground" Value="White"/>
  29. <Setter Property="Background" Value="{DynamicResource ButtonBackground}"/>
  30. <Setter Property="Cursor" Value="Hand"/>
  31. <Setter Property="Width" Value="100"/>
  32. <Setter Property="Height" Value="40"/>
  33. <Setter Property="Template">
  34. <Setter.Value>
  35. <ControlTemplate TargetType="Button">
  36. <Border CornerRadius="2" Background="{TemplateBinding Background}">
  37. <ContentPresenter x:Name="ContentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
  38. </Border>
  39. </ControlTemplate>
  40. </Setter.Value>
  41. </Setter>
  42. </Style>
  43. </Window.Resources>
  44. <Grid>
  45. <Grid.RowDefinitions>
  46. <!-- Dialog Title -->
  47. <RowDefinition Height="Auto"/>
  48. <!-- Main Content -->
  49. <RowDefinition/>
  50. </Grid.RowDefinitions>
  51. <!-- Dialog Title -->
  52. <TextBlock
  53. Text="{DynamicResource EditProfileInformation}"
  54. Foreground="{DynamicResource NormalTextForeground}"
  55. FontSize="16"
  56. Margin="20,20,20,0"/>
  57. <!-- Main Content -->
  58. <StackPanel
  59. Grid.Row="1"
  60. Margin="20">
  61. <StackPanel>
  62. <TextBlock
  63. Style="{StaticResource TextBlockStyle}"
  64. Text="{DynamicResource Name}"/>
  65. <TextBox
  66. Style="{StaticResource TextBoxStyle}"
  67. Margin="0,5,0,0"
  68. x:Name="Name"/>
  69. </StackPanel>
  70. <StackPanel
  71. Margin="0,10,0,0">
  72. <TextBlock
  73. Style="{StaticResource TextBlockStyle}"
  74. Text="{DynamicResource URL}"/>
  75. <TextBox
  76. Style="{StaticResource TextBoxStyle}"
  77. Margin="0,5,0,0"
  78. x:Name="URL"/>
  79. </StackPanel>
  80. <StackPanel
  81. Margin="0,10,0,0">
  82. <TextBlock
  83. Style="{StaticResource TextBlockStyle}"
  84. Text="{DynamicResource UpdateInterval}"/>
  85. <TextBox
  86. Style="{StaticResource TextBoxStyle}"
  87. Margin="0,5,0,0"
  88. x:Name="UpdateInterval"/>
  89. </StackPanel>
  90. <StackPanel
  91. Orientation="Horizontal"
  92. Margin="0,20,0,0"
  93. HorizontalAlignment="Center">
  94. <Button
  95. Style="{StaticResource ButtonStyle}"
  96. Content="{DynamicResource Ok}"
  97. Click="OkButton_Click"
  98. Margin="25,0"/>
  99. <Button
  100. Style="{StaticResource ButtonStyle}"
  101. Content="{DynamicResource Cancel}"
  102. Click="CancelButton_Click"
  103. Margin="25,0"/>
  104. </StackPanel>
  105. </StackPanel>
  106. </Grid>
  107. </Window>