wWorkerUserPrifile.xaml 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. <Page x:Class="teaTime.wWorkerUserPrifile"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:teaTime"
  7. mc:Ignorable="d"
  8. d:DesignHeight="450" d:DesignWidth="800"
  9. Title="wWorkerUserPrifile">
  10. <Page.Resources>
  11. <Style x:Key="FocusVisual">
  12. <Setter Property="Control.Template">
  13. <Setter.Value>
  14. <ControlTemplate>
  15. <Rectangle Margin="2" SnapsToDevicePixels="true" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" StrokeThickness="1" StrokeDashArray="1 2"/>
  16. </ControlTemplate>
  17. </Setter.Value>
  18. </Setter>
  19. </Style>
  20. <SolidColorBrush x:Key="Button.Static.Background" Color="#E8ECC8"/>
  21. <SolidColorBrush x:Key="Button.Static.Border" Color="#E8ECC8"/>
  22. <SolidColorBrush x:Key="Button.MouseOver.Background" Color="#E8ECC8"/>
  23. <SolidColorBrush x:Key="Button.MouseOver.Border" Color="#E8ECC8"/>
  24. <SolidColorBrush x:Key="Button.Pressed.Background" Color="#E8ECC8"/>
  25. <SolidColorBrush x:Key="Button.Pressed.Border" Color="#E8ECC8"/>
  26. <SolidColorBrush x:Key="Button.Disabled.Background" Color="#E8ECC8"/>
  27. <SolidColorBrush x:Key="Button.Disabled.Border" Color="#E8ECC8"/>
  28. <SolidColorBrush x:Key="Button.Disabled.Foreground" Color="#E8ECC8"/>
  29. <Style x:Key="RoundedButtonStyle" TargetType="{x:Type Button}">
  30. <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
  31. <Setter Property="Background" Value="{StaticResource Button.Static.Background}"/>
  32. <Setter Property="BorderBrush" Value="{StaticResource Button.Static.Border}"/>
  33. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
  34. <Setter Property="BorderThickness" Value="0"/>
  35. <Setter Property="HorizontalContentAlignment" Value="Center"/>
  36. <Setter Property="VerticalContentAlignment" Value="Center"/>
  37. <Setter Property="Padding" Value="1"/>
  38. <Setter Property="Template">
  39. <Setter.Value>
  40. <ControlTemplate TargetType="{x:Type Button}">
  41. <Border x:Name="border" CornerRadius="10" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
  42. <ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
  43. </Border>
  44. <ControlTemplate.Triggers>
  45. <Trigger Property="IsDefaulted" Value="true">
  46. <Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
  47. </Trigger>
  48. <Trigger Property="IsMouseOver" Value="true">
  49. <Setter Property="Background" TargetName="border" Value="#E8ECC8"/>
  50. <Setter Property="BorderBrush" TargetName="border" Value="#E8ECC8"/>
  51. </Trigger>
  52. <Trigger Property="IsPressed" Value="true">
  53. <Setter Property="Background" TargetName="border" Value="#E8ECC8"/>
  54. <Setter Property="BorderBrush" TargetName="border" Value="#E8ECC8"/>
  55. </Trigger>
  56. <Trigger Property="IsEnabled" Value="false">
  57. <Setter Property="Background" TargetName="border" Value="{StaticResource Button.Disabled.Background}"/>
  58. <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Disabled.Border}"/>
  59. <Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="{StaticResource Button.Disabled.Foreground}"/>
  60. </Trigger>
  61. </ControlTemplate.Triggers>
  62. </ControlTemplate>
  63. </Setter.Value>
  64. </Setter>
  65. </Style>
  66. <ControlTemplate x:Key="MenuMainItem" TargetType="{x:Type MenuItem}">
  67. <Border x:Name="templateRoot" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
  68. <Grid VerticalAlignment="Center">
  69. <Grid.ColumnDefinitions>
  70. <ColumnDefinition Width="Auto"/>
  71. <ColumnDefinition Width="Auto"/>
  72. </Grid.ColumnDefinitions>
  73. <ContentPresenter x:Name="Icon" Content="{TemplateBinding Icon}" ContentSource="Icon" HorizontalAlignment="Center" Height="16" Margin="3" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="Center" Width="16"/>
  74. <Path x:Name="GlyphPanel" Data="F1M10,1.2L4.7,9.1 4.5,9.1 0,5.2 1.3,3.5 4.3,6.1 8.3,0 10,1.2z" Fill="{TemplateBinding Foreground}" FlowDirection="LeftToRight" Margin="3" Visibility="Collapsed" VerticalAlignment="Center"/>
  75. <ContentPresenter ContentTemplate="{TemplateBinding HeaderTemplate}" Content="{TemplateBinding Header}" Grid.Column="1" ContentStringFormat="{TemplateBinding HeaderStringFormat}" ContentSource="Header" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
  76. <Popup x:Name="PART_Popup" AllowsTransparency="True" Focusable="False" IsOpen="{Binding IsSubmenuOpen, RelativeSource={RelativeSource TemplatedParent}}" PopupAnimation="{DynamicResource {x:Static SystemParameters.MenuPopupAnimationKey}}" Placement="Bottom">
  77. <Border x:Name="SubMenuBorder" BorderBrush="{StaticResource Button.Disabled.Background}" BorderThickness="1" Background="{StaticResource Button.Disabled.Background}" Padding="2">
  78. <ScrollViewer x:Name="SubMenuScrollViewer" Style="{DynamicResource {ComponentResourceKey ResourceId=MenuScrollViewer, TypeInTargetAssembly={x:Type FrameworkElement}}}">
  79. <Grid RenderOptions.ClearTypeHint="Enabled">
  80. <Canvas HorizontalAlignment="Left" Height="0" VerticalAlignment="Top" Width="0">
  81. <Rectangle x:Name="OpaqueRect" Fill="{Binding Background, ElementName=SubMenuBorder}" Height="{Binding ActualHeight, ElementName=SubMenuBorder}" Width="{Binding ActualWidth, ElementName=SubMenuBorder}"/>
  82. </Canvas>
  83. <Rectangle Fill="{StaticResource Button.Disabled.Background}" HorizontalAlignment="Left" Margin="29,2,0,2" Width="1"/>
  84. <ItemsPresenter x:Name="ItemsPresenter" KeyboardNavigation.DirectionalNavigation="Cycle" Grid.IsSharedSizeScope="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" KeyboardNavigation.TabNavigation="Cycle"/>
  85. </Grid>
  86. </ScrollViewer>
  87. </Border>
  88. </Popup>
  89. </Grid>
  90. </Border>
  91. <ControlTemplate.Triggers>
  92. <Trigger Property="IsSuspendingPopupAnimation" Value="True">
  93. <Setter Property="PopupAnimation" TargetName="PART_Popup" Value="None"/>
  94. </Trigger>
  95. <Trigger Property="Icon" Value="{x:Null}">
  96. <Setter Property="Visibility" TargetName="Icon" Value="Collapsed"/>
  97. </Trigger>
  98. <Trigger Property="IsChecked" Value="True">
  99. <Setter Property="Visibility" TargetName="GlyphPanel" Value="Visible"/>
  100. <Setter Property="Visibility" TargetName="Icon" Value="Collapsed"/>
  101. </Trigger>
  102. <Trigger Property="IsHighlighted" Value="True">
  103. <Setter Property="Background" TargetName="templateRoot" Value="{StaticResource Button.Disabled.Background}"/>
  104. <Setter Property="BorderBrush" TargetName="templateRoot" Value="#D3DB94"/>
  105. </Trigger>
  106. </ControlTemplate.Triggers>
  107. </ControlTemplate>
  108. </Page.Resources>
  109. <Viewbox Stretch="Uniform" Grid.RowSpan="2">
  110. <Border Width="800" Height="450">
  111. <Grid>
  112. <Grid VerticalAlignment="Top">
  113. <Grid.Resources>
  114. <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="#E8ECC8" />
  115. <Style TargetType="ScrollBar">
  116. <Setter Property="ScrollViewer.Background" Value="#E8ECC8" />
  117. </Style>
  118. </Grid.Resources>
  119. <Menu Height="30" Width="Auto" VerticalAlignment="Center" Background="#FAEDCD" FontSize="20" FontFamily="{StaticResource GogoiaDeco}" Foreground="#A77748">
  120. <MenuItem x:Name="btMain" Click="btMain_Click" Header="Главная" Height="28" Width="70" Template="{DynamicResource MenuMainItem}"/>
  121. <MenuItem Header="" IsEnabled="False" Width="524" ></MenuItem>
  122. <MenuItem x:Name="btUser" HorizontalContentAlignment="Center" HorizontalAlignment="Right" Height="30" Width="205.5" Background="#D3DB94" Template="{DynamicResource MenuMainItem}">
  123. <MenuItem.Header>
  124. <StackPanel Orientation="Horizontal">
  125. <TextBlock x:Name="aFio" Text="Фамилия имя отчество" VerticalAlignment="Center"/>
  126. <Image x:Name="aImageMenu" Width="25" Height="25" HorizontalAlignment="Right" Margin="10 0 10 0"/>
  127. </StackPanel>
  128. </MenuItem.Header>
  129. </MenuItem>
  130. </Menu>
  131. </Grid>
  132. <Image x:Name="aImage" Width="125" Height="125" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="45 75 0 0"/>
  133. <Grid Margin="220 0 0 0" HorizontalAlignment="Left">
  134. <StackPanel Orientation="Horizontal" Margin="0 80 0 0">
  135. <TextBlock Text="ФИО" FontFamily="{StaticResource GogoiaDeco}" FontWeight="Bold" FontSize="20" Foreground="#A77748" HorizontalAlignment="Left" Margin="0 10 0 0" VerticalAlignment="Top" />
  136. <StackPanel Margin="55 5 0 0">
  137. <TextBlock x:Name="aFIO" Width="260" Height="25" Text="" FontFamily="{StaticResource UniNeue-Regular}" HorizontalAlignment="Left" FontSize="12" Foreground="#A77748"/>
  138. <Line X1="0" Y1="0" X2="260" Y2="0" StrokeDashArray="4 2" StrokeDashCap="Round" Stroke="#A77748" />
  139. </StackPanel>
  140. </StackPanel>
  141. <StackPanel Orientation="Horizontal" Margin="0 120 0 0">
  142. <TextBlock Text="Телефон" FontFamily="{StaticResource GogoiaDeco}" FontWeight="Bold" FontSize="20" Foreground="#A77748" HorizontalAlignment="Left" Margin="0 10 0 0" VerticalAlignment="Top" />
  143. <StackPanel Margin="30 5 0 0">
  144. <TextBlock x:Name="aPhoneNumber" Width="260" Height="25" Text="" FontFamily="{StaticResource UniNeue-Regular}" HorizontalAlignment="Left" FontSize="12" Foreground="#A77748"/>
  145. <Line X1="0" Y1="0" X2="260" Y2="0" StrokeDashArray="4 2" StrokeDashCap="Round" Stroke="#A77748" />
  146. </StackPanel>
  147. </StackPanel>
  148. <StackPanel Orientation="Horizontal" Margin="0 160 0 0">
  149. <TextBlock Text="Email" FontFamily="{StaticResource GogoiaDeco}" FontWeight="Bold" FontSize="20" Foreground="#A77748" HorizontalAlignment="Left" Margin="0 10 0 0" VerticalAlignment="Top" />
  150. <StackPanel Margin="50 5 0 0">
  151. <TextBlock x:Name="aEmail" Width="260" Height="25" Text="" FontFamily="{StaticResource UniNeue-Regular}" HorizontalAlignment="Left" FontSize="12" Foreground="#A77748"/>
  152. <Line X1="0" Y1="0" X2="260" Y2="0" StrokeDashArray="4 2" StrokeDashCap="Round" Stroke="#A77748" />
  153. </StackPanel>
  154. </StackPanel>
  155. </Grid>
  156. <Button x:Name="bChange" Width="140" Height="65" Margin="0 115 50 0" HorizontalAlignment="Right" VerticalAlignment="Top" Click="bChange_Click" Content="Изменить Данные" FontFamily="{StaticResource GogoiaDeco}" FontSize="20" Foreground="#A77748" Style="{DynamicResource RoundedButtonStyle}" Background="#FAEDCD"/>
  157. <TextBlock Text="Ближайшие мероприятия" FontFamily="{StaticResource GogoiaDeco}" FontSize="20" HorizontalAlignment="Left" Foreground="#A77748" Margin="45,219,0,6"/>
  158. <Grid>
  159. <Grid.Resources>
  160. <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="#E8ECC8" />
  161. <Style TargetType="ScrollBar">
  162. <Setter Property="ScrollViewer.Background" Value="#E8ECC8" />
  163. </Style>
  164. </Grid.Resources>
  165. <DataGrid x:Name="tInfo" CanUserAddRows="False" AutoGenerateColumns="False" CanUserSortColumns="True" Loaded="tInfo_Loaded"
  166. Width="700" Height="170" Canvas.Top="510" Canvas.Left="40" ColumnHeaderHeight="25"
  167. FontFamily="{StaticResource UniNeue-Bold}" Foreground="#A77748" FontSize="15"
  168. BorderBrush="#D3DB94" Background="#FAEDCD"
  169. RowBackground="#FAEDCD" AlternatingRowBackground="#FAEDCD" VerticalGridLinesBrush="#D3DB94"
  170. HorizontalGridLinesBrush="#D3DB94"
  171. HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Margin="42,252,58,28" SelectionChanged="tInfo_SelectionChanged"
  172. >
  173. <DataGrid.Resources>
  174. </DataGrid.Resources>
  175. <DataGrid.ColumnHeaderStyle>
  176. <Style TargetType="DataGridColumnHeader">
  177. <Setter Property="Background" Value="#D3DB94" />
  178. <Setter Property="HorizontalContentAlignment" Value="Center" />
  179. </Style>
  180. </DataGrid.ColumnHeaderStyle>
  181. <DataGrid.Columns>
  182. <DataGridTextColumn Binding="{Binding Path= Num}" IsReadOnly="True" FontSize="10" Header="" Width="30" FontFamily="{StaticResource UniNeue-Regular}" Foreground="#A77748"/>
  183. <DataGridTextColumn Binding="{Binding Path= Date}" IsReadOnly="True" FontSize="10" Header="Дата" Width="60" FontFamily="{StaticResource UniNeue-Regular}" Foreground="#A77748"/>
  184. <DataGridTextColumn Binding="{Binding Path= Time}" IsReadOnly="True" FontSize="10" Header="Время" Width="60" FontFamily="{StaticResource UniNeue-Regular}" Foreground="#A77748"/>
  185. <DataGridTextColumn Binding="{Binding Path= Name}" IsReadOnly="True" FontSize="10" Header="Название" Width="100" FontFamily="{StaticResource UniNeue-Regular}" Foreground="#A77748"/>
  186. <DataGridTextColumn Binding="{Binding Path= Theme}" IsReadOnly="True" FontSize="10" Header="Тема" Width="100" FontFamily="{StaticResource UniNeue-Regular}" Foreground="#A77748"/>
  187. <DataGridTextColumn Binding="{Binding Path= Descript}" IsReadOnly="True" FontSize="10" Header="Описание" Width="*" FontFamily="{StaticResource UniNeue-Regular}" Foreground="#A77748"/>
  188. </DataGrid.Columns>
  189. </DataGrid>
  190. </Grid>
  191. </Grid>
  192. </Border>
  193. </Viewbox>
  194. </Page>