MainWindow.xaml 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. <Window x:Class="Hammer_store.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:Hammer_store"
  7. xmlns:cef="clr-namespace:CefSharp.Wpf;assembly=CefSharp.Wpf"
  8. mc:Ignorable="d"
  9. Height="450"
  10. Width="800"
  11. ResizeMode="CanResizeWithGrip"
  12. WindowStartupLocation="CenterScreen"
  13. WindowStyle="None"
  14. AllowsTransparency="True"
  15. Background="Transparent"
  16. Icon="Resources/Images/logo2.png"
  17. Title="Hammer store">
  18. <!--** Рамка с градиентом **-->
  19. <Border CornerRadius="5" BorderThickness="5">
  20. <Border.BorderBrush>
  21. <LinearGradientBrush StartPoint="0 0" EndPoint="1 1">
  22. <GradientStop Color="#FF661579" Offset="0.0"/>
  23. <GradientStop Color="#282c36" Offset="0.5"/>
  24. <GradientStop Color="#FF661579" Offset="1.0"/>
  25. </LinearGradientBrush>
  26. </Border.BorderBrush>
  27. <!--** Сетка для элементов **-->
  28. <Grid>
  29. <!--* Разметка для сетки *-->
  30. <Grid.RowDefinitions>
  31. <RowDefinition Height="40"/>
  32. <RowDefinition />
  33. </Grid.RowDefinitions>
  34. <!--* Фон для сетки *-->
  35. <Grid.Background>
  36. <LinearGradientBrush StartPoint="0 0" EndPoint="1 1">
  37. <GradientStop Color="#FF661579" Offset="0.0"/>
  38. <GradientStop Color="#282c36" Offset="0.5"/>
  39. <GradientStop Color="#FF661579" Offset="1.0"/>
  40. </LinearGradientBrush>
  41. </Grid.Background>
  42. <!--* ТайтлБар для опций с окном *-->
  43. <Grid Name="TitleBar"
  44. MouseDown="TitleBar_MouseDown"
  45. Background="Transparent"
  46. Grid.Row="0">
  47. <!--Изображение для закрытия формы-->
  48. <Image x:Name="Image_cross"
  49. Width="35"
  50. Height="35"
  51. HorizontalAlignment="Right"
  52. Margin="0 0 0 0"
  53. MouseDown="Image_cross_MouseDown">
  54. <Image.Effect>
  55. <DropShadowEffect Direction="270" BlurRadius="10"/>
  56. </Image.Effect>
  57. <Image.Style>
  58. <Style TargetType="{x:Type Image}">
  59. <Setter Property="Source"
  60. Value="Resources/Images/cross_NotActivate.png"/>
  61. <Style.Triggers>
  62. <DataTrigger Binding="{Binding IsMouseOver, ElementName=Image_cross}"
  63. Value="True">
  64. <Setter Property="Source"
  65. Value="Resources/Images/cross_Activate.png"/>
  66. </DataTrigger>
  67. </Style.Triggers>
  68. </Style>
  69. </Image.Style>
  70. </Image>
  71. <!--Изображение для перевода окна в полноэкранный режим-->
  72. <Image x:Name="Image_maximize"
  73. Width="25"
  74. Height="25"
  75. HorizontalAlignment="Right"
  76. Margin="0 0 40 0"
  77. MouseDown="Image_maximize_MouseDown">
  78. <Image.Effect>
  79. <DropShadowEffect Direction="270" BlurRadius="10"/>
  80. </Image.Effect>
  81. <Image.Style>
  82. <Style TargetType="{x:Type Image}">
  83. <Setter Property="Source"
  84. Value="Resources/Images/maximizeOne.png"/>
  85. <Style.Triggers>
  86. <DataTrigger Binding="{Binding IsMouseOver, ElementName=Image_maximize}"
  87. Value="True">
  88. <Setter Property="Source"
  89. Value="Resources/Images/maximizeTwo.png"/>
  90. </DataTrigger>
  91. </Style.Triggers>
  92. </Style>
  93. </Image.Style>
  94. </Image>
  95. <!--Изображение для сворачивания формы-->
  96. <Image x:Name="Image_colapso"
  97. Width="25"
  98. Height="25"
  99. HorizontalAlignment="Right"
  100. Margin="0 0 75 0"
  101. MouseDown="Image_colapso_MouseDown">
  102. <Image.Effect>
  103. <DropShadowEffect Direction="270" BlurRadius="10"/>
  104. </Image.Effect>
  105. <!--Триггер для отображения другой картинки-->
  106. <Image.Style>
  107. <Style TargetType="{x:Type Image}">
  108. <Setter Property="Source"
  109. Value="Resources/Images/colapsoOne.png"/>
  110. <Style.Triggers>
  111. <DataTrigger Binding="{Binding IsMouseOver, ElementName=Image_colapso}"
  112. Value="True">
  113. <Setter Property="Source"
  114. Value="Resources/Images/colapsoTwo.png"/>
  115. </DataTrigger>
  116. </Style.Triggers>
  117. </Style>
  118. </Image.Style>
  119. </Image>
  120. </Grid>
  121. <!--* Браузер *-->
  122. <Grid Name="Site_Hammer_store"
  123. Grid.Row="1">
  124. <cef:ChromiumWebBrowser
  125. x:Name="Browser"
  126. Address="https://store.steampowered.com/"/>
  127. </Grid>
  128. </Grid>
  129. </Border>
  130. </Window>