MainWindow.axaml 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. <Window xmlns="https://github.com/avaloniaui"
  2. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  3. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
  6. x:Class="PracticAvalonia.MainWindow"
  7. Title="PracticAvalonia"
  8. MinWidth="600"
  9. MinHeight="350">
  10. <ScrollViewer>
  11. <Grid HorizontalAlignment="Center">
  12. <StackPanel HorizontalAlignment="Center" Name="WritePanel">
  13. <TextBlock Text="Введите персональные данные:" Margin="5"/>
  14. <TextBox Name="tbSurname" Watermark="Фамилия" Margin="5"/>
  15. <TextBox Name="tbName" Watermark="Имя" Margin="5"/>
  16. <TextBox Name="tbPatronymic" Watermark="Отчество" Margin="5"/>
  17. <StackPanel Orientation="Horizontal">
  18. <TextBlock Text="Пол:" Margin="5"/>
  19. <RadioButton Name="rbM" Margin="5" Content="Мужской"/>
  20. <RadioButton Name="rbG" Margin="5" Content="Женский"/>
  21. </StackPanel>
  22. <StackPanel Orientation="Horizontal">
  23. <TextBlock Text="Номер телефона:" Margin="5"/>
  24. <TextBox Name="tbTelephone" Watermark="8(XXX)XXX-XX-XX" MinWidth="150"/>
  25. </StackPanel>
  26. <StackPanel Orientation="Horizontal" >
  27. <TextBlock Text="Дата рождения:" Margin="5"/>
  28. <NumericUpDown Name="tbDay"
  29. FormatString="0"
  30. Value="1"
  31. Minimum="1"
  32. Maximum="31"
  33. Margin="5"
  34. Width="150"/>
  35. <StackPanel>
  36. <ComboBox Name="cbMonth" SelectedIndex="0" Margin="5" Width="150">
  37. <ComboBoxItem IsEnabled="false" Content="Месяц"/>
  38. <ComboBoxItem Content="Январь"/>
  39. <ComboBoxItem Content="Февраль"/>
  40. <ComboBoxItem Content="Март"/>
  41. <ComboBoxItem Content="Апрель"/>
  42. <ComboBoxItem Content="Май"/>
  43. <ComboBoxItem Content="Июнь"/>
  44. <ComboBoxItem Content="Июль"/>
  45. <ComboBoxItem Content="Август"/>
  46. <ComboBoxItem Content="Сентябрь"/>
  47. <ComboBoxItem Content="Октябрь"/>
  48. <ComboBoxItem Content="Ноябрь"/>
  49. <ComboBoxItem Content="Декабрь"/>
  50. </ComboBox>
  51. </StackPanel>
  52. <NumericUpDown Name="tbYear"
  53. FormatString="0000"
  54. Value="1910"
  55. Minimum="1910"
  56. Maximum="2024"
  57. Margin="5"
  58. Width="150"/>
  59. </StackPanel>
  60. <StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
  61. <Button
  62. Content="Записать в файл"
  63. Click="WriteFile"
  64. Margin="10"
  65. FontSize="18"
  66. Background="Plum"
  67. Foreground="Black"/>
  68. <Button
  69. Content="Прочитать из файла"
  70. Click="ReadFile"
  71. Margin="10"
  72. FontSize="18"
  73. Background="Plum"
  74. Foreground="Black"/>
  75. </StackPanel>
  76. <TextBlock HorizontalAlignment="Center"
  77. Name="ShowMessage"
  78. Foreground="Red"
  79. FontSize="18"/>
  80. </StackPanel>
  81. <StackPanel HorizontalAlignment="Center" Name="ReadPanelControl" IsVisible="False">
  82. <Button HorizontalAlignment="Center"
  83. Content="Назад"
  84. Click="Back"
  85. Margin="10"
  86. FontSize="18"
  87. Background="Plum"
  88. Foreground="Black"/>
  89. <StackPanel HorizontalAlignment="Center" Name="ReadPanel" IsVisible="False">
  90. </StackPanel>
  91. </StackPanel>
  92. </Grid>
  93. </ScrollViewer>
  94. </Window>