CategoryTable.axaml 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. <UserControl xmlns="https://github.com/avaloniaui"
  2. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  3. xmlns:vm="using:FinancialManagement.ViewModels"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
  7. x:Class="FinancialManagement.Views.CategoryTable"
  8. x:DataType="vm:MainWindowViewModel">
  9. <Grid
  10. ColumnDefinitions="*"
  11. RowDefinitions="60, 10, 7*, *"
  12. Background="#7471E8">
  13. <StackPanel
  14. Orientation="Horizontal"
  15. HorizontalAlignment="Left">
  16. <Image
  17. Margin="20 0 0 0"
  18. HorizontalAlignment="Left"
  19. Width="50"
  20. Source="/Assets/Icon_Profile.png"/>
  21. <Border
  22. CornerRadius="10"
  23. Background="#ffffff"
  24. Padding="10 5 10 5"
  25. Margin="30 10 10 0"
  26. Height="40">
  27. <TextBlock
  28. HorizontalAlignment="Center"
  29. FontFamily="{StaticResource NunitoBold}"
  30. Foreground="#7471E8"
  31. FontSize="24"
  32. Text="{Binding FinancialManagementVM.UserName}"/>
  33. </Border>
  34. <Button
  35. Background="#ffffff"
  36. Foreground="#7471E8"
  37. CornerRadius="10"
  38. FontSize="24"
  39. Content="Редактировать профиль"
  40. FontFamily="{StaticResource NunitoBold}"
  41. Height="40"
  42. HorizontalAlignment="Right"
  43. Padding="20 5 20 0"
  44. Margin="20 10 20 0"
  45. Command="{Binding ToProfile}">
  46. <Button.Styles>
  47. <Style Selector="Button:pointerover /template/ ContentPresenter">
  48. <Setter Property="Background" Value="#E3E6FF"></Setter>
  49. <Setter Property="Foreground" Value="#7471E8"></Setter>
  50. </Style>
  51. </Button.Styles>
  52. </Button>
  53. <Button
  54. Background="#ffffff"
  55. Foreground="#7471E8"
  56. CornerRadius="10"
  57. FontSize="24"
  58. Content="Выйти"
  59. FontFamily="{StaticResource NunitoBold}"
  60. Height="40"
  61. HorizontalAlignment="Right"
  62. Padding="20 5 20 0"
  63. Margin="20 10 20 0"
  64. Command="{Binding ToLoadOut}">
  65. <Button.Styles>
  66. <Style Selector="Button:pointerover /template/ ContentPresenter">
  67. <Setter Property="Background" Value="#E3E6FF"></Setter>
  68. <Setter Property="Foreground" Value="#7471E8"></Setter>
  69. </Style>
  70. </Button.Styles>
  71. </Button>
  72. </StackPanel>
  73. <Panel
  74. Grid.Column="0"
  75. Grid.Row="2"
  76. Background="#E3E6FF">
  77. </Panel>
  78. <Panel
  79. Grid.Column="1"
  80. Grid.Row="2"
  81. Background="#E3E6FF">
  82. <StackPanel
  83. Background="#E3E6FF">
  84. <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
  85. <Button
  86. FontFamily="{StaticResource NunitoBold}"
  87. Padding="15 10 15 10"
  88. Content="Назад"
  89. Background="#ffffff"
  90. Foreground="#7471E8"
  91. FontSize="18"
  92. Margin="0 20 40 20"
  93. BorderThickness="3"
  94. BorderBrush="#7471E8"
  95. HorizontalAlignment="Left"
  96. Command="{Binding ToFinanceDataAccount}">
  97. <Button.Styles>
  98. <Style Selector="Button:pointerover /template/ ContentPresenter">
  99. <Setter Property="Background" Value="#7471E8"></Setter>
  100. <Setter Property="Foreground" Value="White"></Setter>
  101. </Style>
  102. </Button.Styles>
  103. </Button>
  104. <Button
  105. FontFamily="{StaticResource NunitoBold}"
  106. Padding="20 10 20 10"
  107. Content="Создать категорию"
  108. Background="#ffffff"
  109. Foreground="#7471E8"
  110. FontSize="20"
  111. Margin=" 0 20 30 20"
  112. BorderThickness="3"
  113. BorderBrush="#7471E8"
  114. HorizontalAlignment="Center"
  115. Command="{Binding OpenNewCategoryData}">
  116. <Button.Styles>
  117. <Style Selector="Button:pointerover /template/ ContentPresenter">
  118. <Setter Property="Background" Value="#7471E8"></Setter>
  119. <Setter Property="Foreground" Value="#ffffff"></Setter>
  120. </Style>
  121. </Button.Styles>
  122. </Button>
  123. <Button
  124. FontFamily="{StaticResource NunitoBold}"
  125. Padding="20 10 20 10"
  126. Content="Открыть категорию"
  127. Background="#ffffff"
  128. Foreground="#7471E8"
  129. FontSize="20"
  130. Margin=" 0 20 0 20"
  131. BorderThickness="3"
  132. BorderBrush="#7471E8"
  133. HorizontalAlignment="Center"
  134. Command="{Binding OpenCategory}">
  135. <Button.Styles>
  136. <Style Selector="Button:pointerover /template/ ContentPresenter">
  137. <Setter Property="Background" Value="#7471E8"></Setter>
  138. <Setter Property="Foreground" Value="White"></Setter>
  139. </Style>
  140. </Button.Styles>
  141. </Button>
  142. <Button
  143. FontFamily="{StaticResource NunitoBold}"
  144. Padding="20 10 20 10"
  145. Content="Удалить категорию"
  146. Background="#ffffff"
  147. Foreground="#7471E8"
  148. FontSize="20"
  149. Margin="30 20 0 20"
  150. BorderThickness="3"
  151. BorderBrush="#7471E8"
  152. HorizontalAlignment="Center"
  153. Command="{Binding DeleteCategory}">
  154. <Button.Styles>
  155. <Style Selector="Button:pointerover /template/ ContentPresenter">
  156. <Setter Property="Background" Value="#7471E8"></Setter>
  157. <Setter Property="Foreground" Value="White"></Setter>
  158. </Style>
  159. </Button.Styles>
  160. </Button>
  161. </StackPanel>
  162. <DataGrid
  163. Width="{Binding $parent[StackPanel].Bounds.Width}"
  164. Height="{Binding $parent[StackPanel].Bounds.Height}"
  165. Background="White"
  166. FontFamily="{StaticResource Nunito}"
  167. FontSize="40"
  168. IsReadOnly="True"
  169. GridLinesVisibility="All"
  170. BorderThickness="3"
  171. BorderBrush="#7471E8"
  172. ItemsSource="{Binding CategoryTableVM.Categores}"
  173. SelectedItem="{Binding CategoryTableVM.ItemCategory}">
  174. <DataGrid.Columns>
  175. <DataGridTextColumn
  176. Header="Категория"
  177. Binding="{Binding CategoryTitle}"
  178. Width="2*"/>
  179. </DataGrid.Columns>
  180. </DataGrid>
  181. </StackPanel>
  182. </Panel>
  183. </Grid>
  184. </UserControl>