MainWindow.xaml 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. <Window x:Class="numbersystem.MainWindow"
  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:numbersystem"
  7. mc:Ignorable="d"
  8. Title="Система счислений" Height="550" Width="350" ResizeMode="NoResize" Icon="/icon.png" FontFamily="Montserrat Light">
  9. <Window.Resources>
  10. <Style TargetType="Button">
  11. <Style.Setters>
  12. <Setter Property="ItemsControl.Background" Value="#8888d7"/>
  13. <Setter Property="ItemsControl.Foreground" Value="White"/>
  14. <Setter Property="ItemsControl.Margin" Value="10"/>
  15. </Style.Setters>
  16. <Style.Triggers>
  17. <Trigger Property="IsMouseOver" Value="True">
  18. <Setter Property="Background" Value="White" />
  19. <Setter Property="Foreground" Value="Black" />
  20. </Trigger>
  21. </Style.Triggers>
  22. </Style>
  23. </Window.Resources>
  24. <Grid>
  25. <TabControl>
  26. <TabItem Header="Калькулятор" FontFamily="Montserrat Light">
  27. <Grid Background="#d7d7f2">
  28. <Grid.RowDefinitions>
  29. <RowDefinition/>
  30. <RowDefinition/>
  31. <RowDefinition/>
  32. <RowDefinition/>
  33. <RowDefinition/>
  34. <RowDefinition/>
  35. <RowDefinition/>
  36. <RowDefinition/>
  37. </Grid.RowDefinitions>
  38. <Grid.ColumnDefinitions>
  39. <ColumnDefinition/>
  40. <ColumnDefinition/>
  41. <ColumnDefinition/>
  42. <ColumnDefinition/>
  43. </Grid.ColumnDefinitions>
  44. <TextBox x:Name="str" IsReadOnly="True" Grid.Row="0" Grid.ColumnSpan="4" Margin="10"
  45. FontSize="16" HorizontalScrollBarVisibility="Auto"
  46. VerticalContentAlignment="Center" HorizontalContentAlignment="Right"
  47. PreviewTextInput="str_PreviewTextInput"
  48. KeyDown="str_KeyDown" PreviewKeyDown="str_KeyDown"/>
  49. <Label Content="Выберите СС:" Grid.Row="1" Grid.ColumnSpan="2" Margin="10,10,43,10" FontSize="14"/>
  50. <ComboBox x:Name="comboBox" Margin="48,10,10,30" Grid.ColumnSpan="3" Grid.Column="1" Grid.Row="1"
  51. SelectionChanged="ComboBox_SelectionChanged">
  52. <ComboBoxItem Content="Двоичная"/>
  53. <ComboBoxItem Content="Восьмеричная"/>
  54. <ComboBoxItem Content="Шестнадцатиричная"/>
  55. </ComboBox>
  56. <Button x:Name="ca"
  57. Content="CA" Grid.Row="5" Grid.Column="0"/>
  58. <Button x:Name="zero"
  59. Content="0" Grid.Row="5" Grid.Column="1"/>
  60. <Button x:Name="erase"
  61. Content="⌫" Grid.Row="5" Grid.Column="2"/>
  62. <Button x:Name="one"
  63. Content="1" Grid.Row="4" Grid.Column="0"/>
  64. <Button x:Name="two"
  65. Content="2" Grid.Row="4" Grid.Column="1"/>
  66. <Button x:Name="three"
  67. Content="3" Grid.Row="4" Grid.Column="2"/>
  68. <Button x:Name="four"
  69. Content="4" Grid.Row="3" Grid.Column="0"/>
  70. <Button x:Name="five"
  71. Content="5" Grid.Row="3" Grid.Column="1"/>
  72. <Button x:Name="six"
  73. Content="6" Grid.Row="3" Grid.Column="2"/>
  74. <Button x:Name="seven"
  75. Content="7" Grid.Row="2" Grid.Column="0"/>
  76. <Button x:Name="eight"
  77. Content="8" Grid.Row="2" Grid.Column="1"/>
  78. <Button x:Name="nine"
  79. Content="9" Grid.Row="2" Grid.Column="2"/>
  80. <Button x:Name="a"
  81. Content="A" Grid.Row="6" Grid.Column="0" Background="#6c6cdf"/>
  82. <Button x:Name="b"
  83. Content="B" Grid.Row="6" Grid.Column="1" Background="#6c6cdf"/>
  84. <Button x:Name="c"
  85. Content="C" Grid.Row="6" Grid.Column="2" Background="#6c6cdf"/>
  86. <Button x:Name="d"
  87. Content="D" Grid.Row="7" Grid.Column="0" Background="#6c6cdf"/>
  88. <Button x:Name="e"
  89. Content="E" Grid.Row="7" Grid.Column="1" Background="#6c6cdf"/>
  90. <Button x:Name="f"
  91. Content="F" Grid.Row="7" Grid.Column="2" Background="#6c6cdf"/>
  92. <Button x:Name="plus"
  93. Content="+" Grid.Row="2" Grid.Column="3" Background="#4040bf"/>
  94. <Button x:Name="minus"
  95. Content="-" Grid.Row="3" Grid.Column="3" Background="#4040bf"/>
  96. <Button x:Name="multiply"
  97. Content="×" Grid.Row="4" Grid.Column="3" Background="#4040bf"/>
  98. <Button x:Name="division"
  99. Content="÷" Grid.Row="5" Grid.Column="3" Background="#4040bf"/>
  100. <Button x:Name="remains"
  101. Content="%" Grid.Row="6" Grid.Column="3" Background="#4040bf"/>
  102. <Button x:Name="equal"
  103. Content="=" Grid.Row="7" Grid.Column="3" Background="#4040bf"/>
  104. </Grid>
  105. </TabItem>
  106. <TabItem Header="История" FontFamily="Montserrat Light">
  107. <Grid Background="#d7d7f2"/>
  108. </TabItem>
  109. <TabItem Header="Диаграмма" FontFamily="Montserrat Light">
  110. <Grid Background="#d7d7f2"/>
  111. </TabItem>
  112. </TabControl>
  113. </Grid>
  114. </Window>