LoginRegion.xaml 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365
  1. <UserControl
  2. x:Class="PDF_Office.Views.Dialog.ServiceDialog.LoginRegion"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:help="clr-namespace:PDF_Office.Helper"
  7. xmlns:local="clr-namespace:PDF_Office.Views.Dialog.ServiceDialog"
  8. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  9. xmlns:prism="http://prismlibrary.com/"
  10. Width="326"
  11. Height="420"
  12. prism:ViewModelLocator.AutoWireViewModel="True"
  13. mc:Ignorable="d">
  14. <UserControl.Resources>
  15. <Style x:Key="EyeCheckbox" TargetType="CheckBox">
  16. <Setter Property="Cursor" Value="Hand" />
  17. <Setter Property="Template">
  18. <Setter.Value>
  19. <ControlTemplate TargetType="{x:Type CheckBox}">
  20. <Grid>
  21. <Border
  22. VerticalAlignment="Center"
  23. Background="Transparent"
  24. BorderBrush="White"
  25. BorderThickness="1"
  26. CornerRadius="0">
  27. <Grid
  28. Name="Grid"
  29. Width="{Binding ActualHeight, RelativeSource={RelativeSource Self}}"
  30. Height="{TemplateBinding Height}">
  31. <Path
  32. Name="Path"
  33. Data="M1.46967 1.5304L13.4699 13.5304L14.5306 12.4697L2.53032 0.469727L1.46967 1.5304ZM9.99623 11.1174L11.1401 12.2613C10.176 12.7137 9.11463 13.0001 8 13.0001C3.58172 13.0001 0 8.50006 0 7.00006C0 6.2525 0.889611 4.75982 2.32903 3.45038L3.39107 4.5124L3.35064 4.54885C2.71795 5.12245 2.22043 5.72507 1.89225 6.23808C1.62112 6.66189 1.53702 6.91174 1.51122 6.98839L1.50727 7.00006L1.51122 7.01173C1.53702 7.08838 1.62112 7.33823 1.89225 7.76205C2.22043 8.27505 2.71795 8.87768 3.35064 9.45128C4.63846 10.6188 6.29481 11.5001 8 11.5001C8.67993 11.5001 9.3521 11.3599 9.99623 11.1174ZM8 1.00006C6.88543 1.00006 5.82409 1.28643 4.86006 1.73876L6.00394 2.88262C6.64802 2.64015 7.32013 2.50006 8 2.50006C9.70519 2.50006 11.3615 3.3813 12.6494 4.54885C13.2821 5.12245 13.7796 5.72507 14.1078 6.23808C14.3789 6.66189 14.463 6.91174 14.4888 6.98839L14.4927 7.00006L14.4888 7.01173C14.463 7.08838 14.3789 7.33823 14.1078 7.76205C13.7796 8.27505 13.2821 8.87768 12.6494 9.45128L12.6091 9.48762L13.6711 10.5496C15.1104 9.24022 16 7.7476 16 7.00006C16 5.50006 12.4183 1.00006 8 1.00006ZM5 7.00006C5 6.7313 5.03534 6.47079 5.10163 6.22293L6.92836 8.04962C6.93565 8.05707 6.94301 8.06444 6.95046 8.07172L8.77718 9.89842C8.52931 9.96472 8.26878 10.0001 8 10.0001C6.34315 10.0001 5 8.65692 5 7.00006ZM7.223 4.10166L10.8984 7.77701C10.9647 7.5292 11 7.26876 11 7.00006C11 5.34321 9.65685 4.00006 8 4.00006C7.73128 4.00006 7.47082 4.03539 7.223 4.10166Z"
  34. Fill="#616469"
  35. SnapsToDevicePixels="False" />
  36. </Grid>
  37. </Border>
  38. </Grid>
  39. <ControlTemplate.Triggers>
  40. <Trigger Property="IsChecked" Value="True">
  41. <Setter TargetName="Path" Property="Data" Value="M14.4888 7.98833L14.4927 8L14.4888 8.01167C14.463 8.08832 14.3789 8.33817 14.1078 8.76198C13.7796 9.27499 13.2821 9.87762 12.6494 10.4512C11.3615 11.6188 9.70519 12.5 8 12.5C6.29481 12.5 4.63846 11.6188 3.35064 10.4512C2.71795 9.87762 2.22043 9.27499 1.89225 8.76198C1.62112 8.33817 1.53702 8.08832 1.51122 8.01167L1.50727 8L1.51122 7.98833C1.53702 7.91168 1.62112 7.66183 1.89225 7.23802C2.22043 6.72501 2.71795 6.12238 3.35064 5.54879C4.63846 4.38124 6.29481 3.5 8 3.5C9.70519 3.5 11.3615 4.38124 12.6494 5.54879C13.2821 6.12238 13.7796 6.72501 14.1078 7.23802C14.3789 7.66183 14.463 7.91168 14.4888 7.98833ZM16 8C16 9.5 12.4183 14 8 14C3.58172 14 0 9.5 0 8C0 6.5 3.58172 2 8 2C12.4183 2 16 6.5 16 8ZM9.5 8C9.5 8.82843 8.82843 9.5 8 9.5C7.17157 9.5 6.5 8.82843 6.5 8C6.5 7.17157 7.17157 6.5 8 6.5C8.82843 6.5 9.5 7.17157 9.5 8ZM11 8C11 9.65685 9.65685 11 8 11C6.34315 11 5 9.65685 5 8C5 6.34315 6.34315 5 8 5C9.65685 5 11 6.34315 11 8Z" />
  42. </Trigger>
  43. <Trigger Property="IsChecked" Value="False">
  44. <Setter TargetName="Path" Property="Data" Value="M1.46967 1.5304L13.4699 13.5304L14.5306 12.4697L2.53032 0.469727L1.46967 1.5304ZM9.99623 11.1174L11.1401 12.2613C10.176 12.7137 9.11463 13.0001 8 13.0001C3.58172 13.0001 0 8.50006 0 7.00006C0 6.2525 0.889611 4.75982 2.32903 3.45038L3.39107 4.5124L3.35064 4.54885C2.71795 5.12245 2.22043 5.72507 1.89225 6.23808C1.62112 6.66189 1.53702 6.91174 1.51122 6.98839L1.50727 7.00006L1.51122 7.01173C1.53702 7.08838 1.62112 7.33823 1.89225 7.76205C2.22043 8.27505 2.71795 8.87768 3.35064 9.45128C4.63846 10.6188 6.29481 11.5001 8 11.5001C8.67993 11.5001 9.3521 11.3599 9.99623 11.1174ZM8 1.00006C6.88543 1.00006 5.82409 1.28643 4.86006 1.73876L6.00394 2.88262C6.64802 2.64015 7.32013 2.50006 8 2.50006C9.70519 2.50006 11.3615 3.3813 12.6494 4.54885C13.2821 5.12245 13.7796 5.72507 14.1078 6.23808C14.3789 6.66189 14.463 6.91174 14.4888 6.98839L14.4927 7.00006L14.4888 7.01173C14.463 7.08838 14.3789 7.33823 14.1078 7.76205C13.7796 8.27505 13.2821 8.87768 12.6494 9.45128L12.6091 9.48762L13.6711 10.5496C15.1104 9.24022 16 7.7476 16 7.00006C16 5.50006 12.4183 1.00006 8 1.00006ZM5 7.00006C5 6.7313 5.03534 6.47079 5.10163 6.22293L6.92836 8.04962C6.93565 8.05707 6.94301 8.06444 6.95046 8.07172L8.77718 9.89842C8.52931 9.96472 8.26878 10.0001 8 10.0001C6.34315 10.0001 5 8.65692 5 7.00006ZM7.223 4.10166L10.8984 7.77701C10.9647 7.5292 11 7.26876 11 7.00006C11 5.34321 9.65685 4.00006 8 4.00006C7.73128 4.00006 7.47082 4.03539 7.223 4.10166Z" />
  45. </Trigger>
  46. </ControlTemplate.Triggers>
  47. </ControlTemplate>
  48. </Setter.Value>
  49. </Setter>
  50. </Style>
  51. <Style x:Key="LoginPasswordBoxStyle" TargetType="PasswordBox">
  52. <Setter Property="Height" Value="32" />
  53. <Setter Property="FontSize" Value="14" />
  54. <Setter Property="Template">
  55. <Setter.Value>
  56. <ControlTemplate TargetType="PasswordBox">
  57. <Border
  58. x:Name="border"
  59. Background="{TemplateBinding Background}"
  60. BorderBrush="{TemplateBinding BorderBrush}"
  61. BorderThickness="{TemplateBinding BorderThickness}"
  62. CornerRadius="4"
  63. SnapsToDevicePixels="True">
  64. <Grid>
  65. <Grid.ColumnDefinitions>
  66. <ColumnDefinition />
  67. <ColumnDefinition Width="24" />
  68. </Grid.ColumnDefinitions>
  69. <Grid Grid.Column="0">
  70. <TextBlock
  71. Name="markText"
  72. Grid.Column="1"
  73. VerticalAlignment="Center"
  74. FontSize="12"
  75. Foreground="#BBB"
  76. Text="{TemplateBinding help:PasswordBoxHelper.DisplayText}"
  77. Visibility="Collapsed" />
  78. <ScrollViewer
  79. x:Name="PART_ContentHost"
  80. MinHeight="20"
  81. VerticalAlignment="Center"
  82. Focusable="false"
  83. HorizontalScrollBarVisibility="Hidden"
  84. VerticalScrollBarVisibility="Hidden" />
  85. </Grid>
  86. </Grid>
  87. </Border>
  88. <ControlTemplate.Triggers>
  89. <Trigger Property="IsEnabled" Value="false">
  90. <Setter TargetName="border" Property="Opacity" Value="0.56" />
  91. </Trigger>
  92. <Trigger Property="IsMouseOver" Value="true">
  93. <Setter TargetName="border" Property="BorderBrush" Value="#FF7EB4EA" />
  94. </Trigger>
  95. <Trigger Property="IsKeyboardFocused" Value="true">
  96. <Setter TargetName="border" Property="BorderBrush" Value="#FF569DE5" />
  97. </Trigger>
  98. <DataTrigger Binding="{Binding Path=LoginPassword}" Value="">
  99. <Setter TargetName="markText" Property="Visibility" Value="Visible" />
  100. </DataTrigger>
  101. </ControlTemplate.Triggers>
  102. </ControlTemplate>
  103. </Setter.Value>
  104. </Setter>
  105. </Style>
  106. <Style x:Key="LoginEmailBoxStyle" TargetType="PasswordBox">
  107. <Setter Property="Height" Value="32" />
  108. <Setter Property="FontSize" Value="14" />
  109. <Setter Property="Template">
  110. <Setter.Value>
  111. <ControlTemplate TargetType="PasswordBox">
  112. <Border
  113. x:Name="border"
  114. Background="{TemplateBinding Background}"
  115. BorderBrush="{TemplateBinding BorderBrush}"
  116. BorderThickness="{TemplateBinding BorderThickness}"
  117. CornerRadius="4"
  118. SnapsToDevicePixels="True">
  119. <Grid>
  120. <Grid.ColumnDefinitions>
  121. <ColumnDefinition />
  122. <ColumnDefinition Width="24" />
  123. </Grid.ColumnDefinitions>
  124. <Grid Grid.Column="0">
  125. <TextBlock
  126. Name="markText"
  127. Grid.Column="1"
  128. VerticalAlignment="Center"
  129. FontSize="12"
  130. Foreground="#BBB"
  131. Text="{TemplateBinding help:PasswordBoxHelper.DisplayText}"
  132. Visibility="Collapsed" />
  133. <ScrollViewer
  134. x:Name="PART_ContentHost"
  135. MinHeight="20"
  136. VerticalAlignment="Center"
  137. Focusable="false"
  138. HorizontalScrollBarVisibility="Hidden"
  139. VerticalScrollBarVisibility="Hidden" />
  140. </Grid>
  141. </Grid>
  142. </Border>
  143. <ControlTemplate.Triggers>
  144. <Trigger Property="IsEnabled" Value="false">
  145. <Setter TargetName="border" Property="Opacity" Value="0.56" />
  146. </Trigger>
  147. <Trigger Property="IsMouseOver" Value="true">
  148. <Setter TargetName="border" Property="BorderBrush" Value="#FF7EB4EA" />
  149. </Trigger>
  150. <Trigger Property="IsKeyboardFocused" Value="true">
  151. <Setter TargetName="border" Property="BorderBrush" Value="#FF569DE5" />
  152. </Trigger>
  153. <DataTrigger Binding="{Binding Path=LoginPassword}" Value="">
  154. <Setter TargetName="markText" Property="Visibility" Value="Visible" />
  155. </DataTrigger>
  156. </ControlTemplate.Triggers>
  157. </ControlTemplate>
  158. </Setter.Value>
  159. </Setter>
  160. </Style>
  161. <Style x:Key="LoginPasswordTextBoxStyle" TargetType="TextBox">
  162. <Setter Property="Height" Value="32" />
  163. <Setter Property="FontSize" Value="14" />
  164. <Setter Property="Template">
  165. <Setter.Value>
  166. <ControlTemplate TargetType="TextBox">
  167. <Border
  168. x:Name="border"
  169. Background="{TemplateBinding Background}"
  170. BorderBrush="{TemplateBinding BorderBrush}"
  171. BorderThickness="{TemplateBinding BorderThickness}"
  172. CornerRadius="5"
  173. SnapsToDevicePixels="True">
  174. <Grid>
  175. <Grid.ColumnDefinitions>
  176. <ColumnDefinition />
  177. <ColumnDefinition Width="24" />
  178. </Grid.ColumnDefinitions>
  179. <Grid Grid.Column="0">
  180. <TextBlock
  181. Name="markText"
  182. Grid.Column="1"
  183. VerticalAlignment="Center"
  184. FontSize="12"
  185. Foreground="#BBB"
  186. Text="{TemplateBinding help:PasswordBoxHelper.DisplayText}"
  187. Visibility="Collapsed" />
  188. <ScrollViewer
  189. x:Name="PART_ContentHost"
  190. MinHeight="20"
  191. VerticalAlignment="Center"
  192. Focusable="false"
  193. HorizontalScrollBarVisibility="Hidden"
  194. VerticalScrollBarVisibility="Hidden" />
  195. </Grid>
  196. </Grid>
  197. </Border>
  198. <ControlTemplate.Triggers>
  199. <Trigger Property="IsEnabled" Value="false">
  200. <Setter TargetName="border" Property="Opacity" Value="0.56" />
  201. </Trigger>
  202. <Trigger Property="IsMouseOver" Value="true">
  203. <Setter TargetName="border" Property="BorderBrush" Value="#FF7EB4EA" />
  204. </Trigger>
  205. <Trigger Property="IsKeyboardFocused" Value="true">
  206. <Setter TargetName="border" Property="BorderBrush" Value="#FF569DE5" />
  207. </Trigger>
  208. <DataTrigger Binding="{Binding Path=LoginPassword}" Value="">
  209. <Setter TargetName="markText" Property="Visibility" Value="Visible" />
  210. </DataTrigger>
  211. </ControlTemplate.Triggers>
  212. </ControlTemplate>
  213. </Setter.Value>
  214. </Setter>
  215. </Style>
  216. <Style x:Key="LoginEmailTextBoxStyle" TargetType="TextBox">
  217. <Setter Property="Height" Value="32" />
  218. <Setter Property="FontSize" Value="14" />
  219. <Setter Property="Template">
  220. <Setter.Value>
  221. <ControlTemplate TargetType="TextBox">
  222. <Border
  223. x:Name="border"
  224. Background="{TemplateBinding Background}"
  225. BorderBrush="{TemplateBinding BorderBrush}"
  226. BorderThickness="{TemplateBinding BorderThickness}"
  227. CornerRadius="4"
  228. SnapsToDevicePixels="True">
  229. <Grid>
  230. <Grid.ColumnDefinitions>
  231. <ColumnDefinition />
  232. <ColumnDefinition Width="24" />
  233. </Grid.ColumnDefinitions>
  234. <Grid Grid.Column="0">
  235. <TextBlock
  236. Name="markText"
  237. Grid.Column="1"
  238. VerticalAlignment="Center"
  239. FontSize="12"
  240. Foreground="#BBB"
  241. Text="{TemplateBinding help:PasswordBoxHelper.DisplayText}"
  242. Visibility="Collapsed" />
  243. <ScrollViewer
  244. x:Name="PART_ContentHost"
  245. MinHeight="20"
  246. VerticalAlignment="Center"
  247. Focusable="false"
  248. HorizontalScrollBarVisibility="Hidden"
  249. VerticalScrollBarVisibility="Hidden" />
  250. </Grid>
  251. </Grid>
  252. </Border>
  253. <ControlTemplate.Triggers>
  254. <Trigger Property="IsEnabled" Value="false">
  255. <Setter TargetName="border" Property="Opacity" Value="0.56" />
  256. </Trigger>
  257. <Trigger Property="IsMouseOver" Value="true">
  258. <Setter TargetName="border" Property="BorderBrush" Value="#FF7EB4EA" />
  259. </Trigger>
  260. <Trigger Property="IsKeyboardFocused" Value="true">
  261. <Setter TargetName="border" Property="BorderBrush" Value="#FF569DE5" />
  262. </Trigger>
  263. <DataTrigger Binding="{Binding Path=LoginEmail}" Value="">
  264. <Setter TargetName="markText" Property="Visibility" Value="Visible" />
  265. </DataTrigger>
  266. </ControlTemplate.Triggers>
  267. </ControlTemplate>
  268. </Setter.Value>
  269. </Setter>
  270. </Style>
  271. </UserControl.Resources>
  272. <Grid>
  273. <Grid Background="White">
  274. <TextBlock
  275. Width="72"
  276. Height="28"
  277. Margin="32,48,0,0"
  278. HorizontalAlignment="Left"
  279. VerticalAlignment="Top"
  280. FontFamily="Segoe UI"
  281. FontSize="20"
  282. FontStyle="Normal"
  283. FontWeight="SemiBold"
  284. Text="Login" />
  285. <TextBlock
  286. Width="122"
  287. Height="22"
  288. Margin="32,108,0,0"
  289. HorizontalAlignment="Left"
  290. VerticalAlignment="Top"
  291. FontFamily="Segoe UI"
  292. FontSize="14"
  293. FontStyle="Normal"
  294. Text="Enter email account" />
  295. <Grid
  296. Width="262"
  297. Height="32"
  298. Margin="32,138,0,0"
  299. HorizontalAlignment="Left"
  300. VerticalAlignment="Top">
  301. <TextBox
  302. x:Name="Text_Email"
  303. Grid.ColumnSpan="2"
  304. help:PasswordBoxHelper.DisplayText="{Binding LoginEmailMsg, Mode=TwoWay}"
  305. Style="{StaticResource LoginEmailTextBoxStyle}"
  306. Text="{Binding LoginEmail, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
  307. />
  308. </Grid>
  309. <TextBlock
  310. Width="262"
  311. Height="20"
  312. Margin="32,172,0,0"
  313. Foreground="#F3465B"
  314. HorizontalAlignment="Left"
  315. VerticalAlignment="Top"
  316. Text="{Binding LoginEmaillook, Mode=TwoWay}" />
  317. <Button
  318. Width="262"
  319. Height="32"
  320. Margin="32,240,0,0"
  321. HorizontalAlignment="Left"
  322. VerticalAlignment="Top"
  323. Command="{Binding LoginNextCommand}"
  324. Content="Next Step"
  325. IsEnabled="{Binding EnableNextStep, Mode=TwoWay}"
  326. Style="{StaticResource Btn.cta}" />
  327. <TextBlock
  328. Width="144"
  329. Height="20"
  330. Margin="61.5,282,0,0"
  331. HorizontalAlignment="Left"
  332. VerticalAlignment="Top"
  333. FontFamily="Segoe UI"
  334. FontSize="12"
  335. FontWeight="Normal"
  336. LineHeight="20"
  337. Text="Don't have an account yet?" />
  338. <TextBlock
  339. Width="43"
  340. Height="20"
  341. Margin="213.5,282,0,0"
  342. HorizontalAlignment="Left"
  343. VerticalAlignment="Top"
  344. FontFamily="Segoe UI"
  345. FontSize="12"
  346. FontWeight="Normal"
  347. Foreground="#1770F4"
  348. LineHeight="20">
  349. <Hyperlink Command="{Binding GoLoginCommand}">Register</Hyperlink>
  350. </TextBlock>
  351. </Grid>
  352. </Grid>
  353. </UserControl>