ChangeEmailDialog.xaml 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  1. <UserControl
  2. x:Class="PDF_Master.Views.Dialog.ServiceDialog.ChangeEmailDialog"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:convert="clr-namespace:PDF_Master.DataConvert"
  6. xmlns:customControl="clr-namespace:PDF_Master.CustomControl"
  7. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  8. xmlns:help="clr-namespace:PDF_Master.Helper"
  9. xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
  10. xmlns:local="clr-namespace:PDF_Master.Views.Dialog.ServiceDialog"
  11. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  12. xmlns:prism="http://prismlibrary.com/"
  13. xmlns:viewmodels="clr-namespace:PDF_Master.ViewModels.Dialog.ServiceDialog"
  14. Width="404"
  15. Height="460"
  16. d:DataContext="{d:DesignInstance Type=viewmodels:ChangeEmailDialogViewModel}"
  17. d:DesignHeight="460"
  18. d:DesignWidth="404"
  19. prism:Dialog.WindowStyle="{StaticResource DialogWindowStyle}"
  20. prism:ViewModelLocator.AutoWireViewModel="True"
  21. Background="{StaticResource color.sys.layout.mg}"
  22. mc:Ignorable="d">
  23. <UserControl.Resources>
  24. <ResourceDictionary>
  25. <convert:LoginBordVis x:Key="LoginBordVis" />
  26. <ResourceDictionary.MergedDictionaries>
  27. <ResourceDictionary Source="pack://application:,,,/PDF Master;component/Styles/StepControlStyle.xaml" />
  28. <ResourceDictionary Source="pack://application:,,,/PDF Master;component/Styles/RegisterStyle.xaml" />
  29. </ResourceDictionary.MergedDictionaries>
  30. </ResourceDictionary>
  31. </UserControl.Resources>
  32. <Grid>
  33. <Button
  34. Width="46"
  35. Height="32"
  36. Margin="8"
  37. HorizontalAlignment="Right"
  38. VerticalAlignment="Top"
  39. Background="Transparent"
  40. IsCancel="True"
  41. Style="{StaticResource CloseBtn}"
  42. WindowChrome.IsHitTestVisibleInChrome="True">
  43. <Path
  44. Width="46"
  45. Height="32"
  46. Data="M23 17.708L18.8545 21.8535C18.7568 21.9512 18.6396 22 18.5029 22C18.3597 22 18.2393 21.9528 18.1416 21.8584C18.0472 21.7607 18 21.6403 18 21.4971C18 21.3604 18.0488 21.2432 18.1465 21.1455L22.292 17L18.1465 12.8545C18.0488 12.7568 18 12.638 18 12.498C18 12.4297 18.013 12.3646 18.0391 12.3027C18.0651 12.2409 18.1009 12.1888 18.1465 12.1465C18.1921 12.1009 18.2458 12.0651 18.3076 12.0391C18.3695 12.013 18.4346 12 18.5029 12C18.6396 12 18.7568 12.0488 18.8545 12.1465L23 16.292L27.1455 12.1465C27.2432 12.0488 27.362 12 27.502 12C27.5703 12 27.6338 12.013 27.6924 12.0391C27.7542 12.0651 27.8079 12.1009 27.8535 12.1465C27.8991 12.1921 27.9349 12.2458 27.9609 12.3076C27.987 12.3662 28 12.4297 28 12.498C28 12.638 27.9512 12.7568 27.8535 12.8545L23.708 17L27.8535 21.1455C27.9512 21.2432 28 21.3604 28 21.4971C28 21.5654 27.987 21.6305 27.9609 21.6924C27.9349 21.7542 27.8991 21.8079 27.8535 21.8535C27.8112 21.8991 27.7591 21.9349 27.6973 21.9609C27.6354 21.987 27.5703 22 27.502 22C27.362 22 27.2432 21.9512 27.1455 21.8535L23 17.708Z"
  47. Fill="Black" />
  48. </Button>
  49. <StackPanel Margin="50,50,50,0">
  50. <Label Content="Change Email" FontSize="20" />
  51. <customControl:StepBar
  52. x:Name="StepBar"
  53. Height="35"
  54. Margin="0,20"
  55. ActivateColor="#1770F4"
  56. CurrentIndex="0"
  57. LineMinLength="68"
  58. Orientation="Horizontal"
  59. UnActivateColor="#EDEEF0">
  60. <customControl:StepBarItem>1</customControl:StepBarItem>
  61. <customControl:StepBarItem>2</customControl:StepBarItem>
  62. <customControl:StepBarItem>3</customControl:StepBarItem>
  63. <customControl:StepBarItem>4</customControl:StepBarItem>
  64. </customControl:StepBar>
  65. <StackPanel>
  66. <Label Content="Enter your current email address" />
  67. <Grid
  68. Width="300"
  69. Height="32"
  70. Margin="0,8,0,0"
  71. HorizontalAlignment="Left"
  72. VerticalAlignment="Top">
  73. <TextBox
  74. Name="Text_Email"
  75. Grid.ColumnSpan="2"
  76. help:PasswordBoxHelper.DisplayText="{Binding RegisterEmailMsg, Mode=TwoWay}"
  77. Style="{StaticResource RegisterEmailTextBoxStyle}"
  78. Text="{Binding RegisterEmail, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
  79. <Border
  80. BorderBrush="#F3465B"
  81. BorderThickness="1"
  82. CornerRadius="4"
  83. Effect="{StaticResource shadow.red-0-4}"
  84. Visibility="{Binding ElementName=Textbl_email, Path=Text, Converter={StaticResource LoginBordVis}}" />
  85. </Grid>
  86. <TextBlock
  87. x:Name="Textbl_email"
  88. Width="304"
  89. Height="20"
  90. Margin="0,2,0,0"
  91. HorizontalAlignment="Left"
  92. VerticalAlignment="Top"
  93. Foreground="#F3465B"
  94. Text="{Binding RegisterEmaillook, Mode=TwoWay}" />
  95. <Label Content="Enter password" />
  96. <Grid Margin="0,8,0,0">
  97. <Grid
  98. Width="304"
  99. Height="32"
  100. HorizontalAlignment="Left"
  101. VerticalAlignment="Top">
  102. <Grid.ColumnDefinitions>
  103. <ColumnDefinition />
  104. <ColumnDefinition Width="24" />
  105. </Grid.ColumnDefinitions>
  106. <PasswordBox
  107. Grid.ColumnSpan="2"
  108. help:PasswordBoxHelper.DisplayText="{Binding RegisterPasswordMsg, Mode=TwoWay}"
  109. help:PasswordBoxHelper.Password="{Binding RegisterPassword, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
  110. InputMethod.IsInputMethodEnabled="False"
  111. PreviewTextInput="TextBox_PreviewTextInput"
  112. Style="{StaticResource RegisterPasswordBoxStyle}"
  113. Visibility="{Binding RegisterPasswordVisibility, Mode=TwoWay}" />
  114. <TextBox
  115. Grid.ColumnSpan="2"
  116. help:PasswordBoxHelper.DisplayText="{Binding RegisterPasswordMsg, Mode=TwoWay}"
  117. InputMethod.IsInputMethodEnabled="False"
  118. PreviewTextInput="TextBox_PreviewTextInput"
  119. Style="{StaticResource RegisterPasswordTextBoxStyle}"
  120. Text="{Binding RegisterPassword, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
  121. Visibility="{Binding RegisterTextVisibility, Mode=TwoWay}">
  122. <i:Interaction.Triggers>
  123. <i:EventTrigger EventName="TextChanged">
  124. <i:InvokeCommandAction Command="{Binding RegisterPasswordChangedCommand}" />
  125. </i:EventTrigger>
  126. </i:Interaction.Triggers>
  127. </TextBox>
  128. <CheckBox
  129. x:Name="DisplayRegisterPasswordChk"
  130. Grid.Column="1"
  131. Height="16"
  132. HorizontalAlignment="Left"
  133. Panel.ZIndex="1"
  134. Command="{Binding DisplayPasswordCommand}"
  135. CommandParameter="{Binding RelativeSource={RelativeSource Self}}"
  136. IsChecked="{Binding IsRegisterPasswordDisplayed, Mode=TwoWay}"
  137. Style="{StaticResource EyeCheckbox}"
  138. Visibility="{Binding ChkVis}" />
  139. </Grid>
  140. <Border
  141. BorderBrush="#F3465B"
  142. BorderThickness="1"
  143. CornerRadius="4"
  144. Effect="{StaticResource shadow.red-0-4}"
  145. Visibility="{Binding ElementName=Textbl_email, Path=Text, Converter={StaticResource LoginBordVis}}" />
  146. </Grid>
  147. <TextBlock
  148. x:Name="Textbl_password"
  149. Width="304"
  150. Height="20"
  151. Margin="0,2,0,0"
  152. HorizontalAlignment="Left"
  153. VerticalAlignment="Top"
  154. Foreground="#F3465B"
  155. Text="{Binding RegisterePasswordlook, Mode=TwoWay}" />
  156. <Button
  157. Width="300"
  158. Height="32"
  159. Margin="0,16,0,0"
  160. HorizontalAlignment="Left"
  161. VerticalAlignment="Top"
  162. Command="{Binding RegisterNextCommand}"
  163. Content="{Binding RegisterNextStep}"
  164. IsDefault="True"
  165. IsEnabled="{Binding EnableNextStep, Mode=TwoWay}"
  166. Style="{StaticResource Btn.cta}" />
  167. </StackPanel>
  168. <WrapPanel>
  169. <Button
  170. Name="BtnNext"
  171. Width="50"
  172. Margin="20"
  173. Click="BtnNext_Click"
  174. Content="下一步" />
  175. <Button
  176. Name="BtnPrevious"
  177. Width="50"
  178. Margin="20"
  179. Click="BtnPrevious_Click"
  180. Content="上一步" />
  181. </WrapPanel>
  182. </StackPanel>
  183. </Grid>
  184. </UserControl>