DoubleDialogView.axaml 4.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <UserControl 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. xmlns:dialogs="clr-namespace:InABox.Avalonia.Dialogs"
  6. xmlns:components="clr-namespace:InABox.Avalonia.Components"
  7. mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
  8. x:Class="InABox.Avalonia.Dialogs.DoubleDialogView"
  9. x:DataType="dialogs:DoubleDialogViewModel">
  10. <Grid>
  11. <Grid.RowDefinitions>
  12. <RowDefinition Height="Auto"/>
  13. <RowDefinition Height="Auto"/>
  14. <RowDefinition Height="Auto"/>
  15. <RowDefinition Height="Auto"/>
  16. </Grid.RowDefinitions>
  17. <Grid.ColumnDefinitions>
  18. <ColumnDefinition Width="Auto"/>
  19. <ColumnDefinition Width="*"/>
  20. <ColumnDefinition Width="Auto"/>
  21. </Grid.ColumnDefinitions>
  22. <Label
  23. Grid.Row="0"
  24. Grid.Column="0"
  25. Grid.ColumnSpan="3"
  26. Margin="0,0,0,10"
  27. Content="{Binding Title}" />
  28. <Grid
  29. Grid.Row="1"
  30. Grid.Column="0"
  31. Grid.ColumnSpan="3"
  32. Margin="0,0,0,10">
  33. <Grid.RowDefinitions>
  34. <RowDefinition Height="*"/>
  35. <RowDefinition Height="*"/>
  36. <RowDefinition Height="*"/>
  37. <RowDefinition Height="*"/>
  38. <RowDefinition Height="*"/>
  39. </Grid.RowDefinitions>
  40. <Grid.ColumnDefinitions>
  41. <ColumnDefinition Width="*"/>
  42. <ColumnDefinition Width="*"/>
  43. <ColumnDefinition Width="*"/>
  44. </Grid.ColumnDefinitions>
  45. <Button Classes="Standard" Content="+/-" Grid.Row="0" Grid.Column="0" Command="{Binding NegativePressedCommand}" />
  46. <TextBox
  47. Grid.Row="0"
  48. Grid.Column="1"
  49. Grid.ColumnSpan="2"
  50. Text="{Binding Text}"
  51. VerticalContentAlignment="Center"
  52. HorizontalContentAlignment="Center"
  53. Margin="{DynamicResource PrsControlSpacing}" />
  54. <Button Classes="Standard" Content="1" Grid.Row="1" Grid.Column="0" Command="{Binding KeyPressedCommand}" CommandParameter="1" Height="60" />
  55. <Button Classes="Standard" Content="2" Grid.Row="1" Grid.Column="1" Command="{Binding KeyPressedCommand}" CommandParameter="2" Height="60"/>
  56. <Button Classes="Standard" Content="3" Grid.Row="1" Grid.Column="2" Command="{Binding KeyPressedCommand}" CommandParameter="3" Height="60"/>
  57. <Button Classes="Standard" Content="4" Grid.Row="2" Grid.Column="0" Command="{Binding KeyPressedCommand}" CommandParameter="4" Height="60" />
  58. <Button Classes="Standard" Content="5" Grid.Row="2" Grid.Column="1" Command="{Binding KeyPressedCommand}" CommandParameter="5" Height="60" />
  59. <Button Classes="Standard" Content="6" Grid.Row="2" Grid.Column="2" Command="{Binding KeyPressedCommand}" CommandParameter="6" Height="60" />
  60. <Button Classes="Standard" Content="7" Grid.Row="3" Grid.Column="0" Command="{Binding KeyPressedCommand}" CommandParameter="7" Height="60" />
  61. <Button Classes="Standard" Content="8" Grid.Row="3" Grid.Column="1" Command="{Binding KeyPressedCommand}" CommandParameter="8" Height="60" />
  62. <Button Classes="Standard" Content="9" Grid.Row="3" Grid.Column="2" Command="{Binding KeyPressedCommand}" CommandParameter="9" Height="60" />
  63. <Button Classes="Standard" Content="Del" Grid.Row="4" Grid.Column="0" Command="{Binding BackPressedCommand}" Height="60" />
  64. <Button Classes="Standard" Content="0" Grid.Row="4" Grid.Column="1" Command="{Binding KeyPressedCommand}" CommandParameter="0" Height="60" />
  65. <Button Classes="Standard" Content="." Grid.Row="4" Grid.Column="2" Command="{Binding DecimalPressedCommand}" CommandParameter="." Height="60" />
  66. </Grid>
  67. <Button
  68. Grid.Row="2"
  69. Grid.Column="0"
  70. Content="Cancel"
  71. Command="{Binding CancelCommand}"
  72. Classes="Standard"/>
  73. <Button
  74. Grid.Row="2"
  75. Grid.Column="2"
  76. Content="OK"
  77. Command="{Binding OkCommand}"
  78. Classes="Standard"/>
  79. </Grid>
  80. </UserControl>