<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

	<Style x:Key="ButtonStyle" TargetType="{x:Type Button}">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type Button}">
					<!--możliwość zmiany rozmiaru-->
					<StackPanel>
						<Grid Name="buttonGrid" >
							<Grid.RowDefinitions>
								<RowDefinition Height="0.98*"/>
								<RowDefinition Height="0.02*"/>
							</Grid.RowDefinitions>

							<!--wartwa tła-->
							<!--możliwość zmiany tła-->
							<Ellipse x:Name="backgroundLayer" Fill="{TemplateBinding Background}" Grid.RowSpan="2"/>
							<!-- warstwa rozproszenia -->
							<Ellipse x:Name="diffusionLayer" Grid.RowSpan="2" RenderTransformOrigin="0.0,0.45" >
								<Ellipse.Fill>
									<RadialGradientBrush GradientOrigin="0.5,1.05" RadiusY="0.5" RadiusX="1.55">
										<RadialGradientBrush.RelativeTransform>
											<TransformGroup>
												<ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.5" ScaleY="1.5"/>
												<TranslateTransform X="0.02" Y="0.3"/>
											</TransformGroup>
										</RadialGradientBrush.RelativeTransform>
										<GradientStop Offset="1" Color="#00000000"/>
										<GradientStop Offset="0.4" Color="#FFFFFFFF"/>
									</RadialGradientBrush>
								</Ellipse.Fill>
							</Ellipse>
							<!-- warstwa odbicia -->
							<Path x:Name="reflectionLayer" VerticalAlignment="Stretch" Stretch="Fill" Grid.RowSpan="1" Height="Auto" Margin="-1.018,-1,1,0.166" Width="Auto" RenderTransformOrigin="0,0">
								<Path.RenderTransform>
									<TransformGroup>
										<ScaleTransform ScaleY="0.5"/>
										<SkewTransform/>
										<RotateTransform Angle="-0.994"/>
										<TranslateTransform/>
									</TransformGroup>
								</Path.RenderTransform>
								<Path.Data>
									<PathGeometry>
										<PathFigure IsClosed="True" StartPoint="98.999,45.499">
											<PolyBezierSegment Points="98.999,54.17 89.046,52.258 85.502,51.029 84.579183,50.708952 68.286821,46.29595 51.719971,46.29787 32.31416,46.30012 12.180906,50.785527 10.665,51.363"/>
											<BezierSegment IsSmoothJoin="True" Point3="1,44.999" Point2="1,53.252" Point1="7.469,52.58"/>
											<BezierSegment Point3="2.519,34.286" Point2="0.884,39.227" Point1="1,39.51"/>
											<BezierSegment IsSmoothJoin="True" Point3="50,0" Point2="27.875,0" Point1="9.106,14.37"/>
											<BezierSegment Point3="97.546,34.485" Point2="91.018,14.466" Point1="72.198,0"/>
											<BezierSegment IsSmoothJoin="True" Point3="98.999,45.499" Point2="98.999,40.084" Point1="99.139,39.369"/>
										</PathFigure>
									</PathGeometry>
								</Path.Data>
								<Path.Fill>
									<RadialGradientBrush GradientOrigin="0.498,0.526">
										<RadialGradientBrush.RelativeTransform>
											<TransformGroup>
												<ScaleTransform
                                       CenterX="0.5"
                                       CenterY="0.5"
                                       ScaleX="1"
                                       ScaleY="1.997"/>
												<TranslateTransform X="0" Y="0.5"/>
											</TransformGroup>
										</RadialGradientBrush.RelativeTransform>
										<GradientStop Offset="1" Color="#FFFFFFFF"/>
										<GradientStop Offset="0.891" Color="#92FFFFFF"/>
										<GradientStop Offset="0" Color="#00000000"/>
									</RadialGradientBrush>
								</Path.Fill>
							</Path>
							<Viewbox>
								<!--możliwość wpływania na właściowść Padding-->
								<ContentPresenter Margin="{TemplateBinding Padding}"/>
							</Viewbox>

						</Grid>
						<Rectangle Height="{Binding Path=ActualHeight, ElementName=buttonGrid}" 
      Width="{Binding Path=ActualWidth, ElementName=buttonGrid}"
>
							<Rectangle.Fill>
								<VisualBrush 
          Visual="{Binding ElementName=buttonGrid}">
								</VisualBrush>

							</Rectangle.Fill>

							<Rectangle.LayoutTransform>
								<ScaleTransform ScaleY="-0.75"/>
							</Rectangle.LayoutTransform>
							<Rectangle.OpacityMask>
								<LinearGradientBrush EndPoint="0,0.9">
									<GradientStop Offset="0.3" Color="Transparent"/>
									<GradientStop Offset="1" Color="#77000000"/>
								</LinearGradientBrush>
							</Rectangle.OpacityMask>


						</Rectangle>
					</StackPanel>
					<ControlTemplate.Triggers>
						<EventTrigger RoutedEvent="Button.MouseEnter">
							<EventTrigger.Actions>
								<BeginStoryboard>
									<Storyboard>
										<DoubleAnimation  Storyboard.TargetProperty="RenderTransform.Y"
To="-100" Duration="0:0:1">
											<DoubleAnimation.EasingFunction>
												<CircleEase EasingMode="EaseOut" />
											</DoubleAnimation.EasingFunction>
										</DoubleAnimation>
										<DoubleAnimation  Storyboard.TargetProperty="RenderTransform.Y"
To="0" Duration="0:0:2">
											<DoubleAnimation.EasingFunction>
												<BounceEase EasingMode="EaseOut" />
											</DoubleAnimation.EasingFunction>
										</DoubleAnimation>

									</Storyboard>
								</BeginStoryboard>
							</EventTrigger.Actions>
						</EventTrigger>

						<Trigger Property="Button.IsMouseOver" Value="True">
							<Setter TargetName="backgroundLayer" Property="Fill" Value="Red"/>
						</Trigger>
						<Trigger Property="Button.IsPressed" Value="True">
							<Setter Property="RenderTransform">
								<Setter.Value>
									<ScaleTransform ScaleX="0.9" ScaleY="0.9"/>
								</Setter.Value>
							</Setter>
							<Setter Property="RenderTransformOrigin" Value="0.5,0.5"/>
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>

		</Setter>
		<Setter Property="RenderTransform">
			<Setter.Value>
				<TranslateTransform/>
			</Setter.Value>
		</Setter>
		<Setter Property="MaxHeight" Value="200"/>
		<Setter Property="MaxWidth" Value="100"/>
		<Setter Property="Margin" Value="228,18,124,15"/>
		<Setter Property="Background" Value="Indigo"/>
	</Style>
	<Style x:Key="TreeViewStyle" TargetType="{x:Type TreeView}">
		<Setter Property="MinWidth" Value="130"/>
		<Setter Property="HorizontalAlignment" Value="Left"/>
		<Setter Property="Background" Value="Transparent"/>
	</Style>
	<Style x:Key="TreeViewItemStyle" TargetType="{x:Type TreeViewItem}">
		<Setter Property="FontSize" Value="16"/>
		<Setter Property="FontFamily"  Value="Buxton Sketch"/>
		<Setter Property="Background" Value="Transparent"/>
		<Setter Property="Foreground" Value="White"/>
	</Style>
	<Style x:Key="GridStyle" TargetType="{x:Type Grid}">
		<Setter Property="Background">
			<Setter.Value>
				<ImageBrush >
					<ImageBrush.ImageSource>
						<BitmapImage UriSource="Images\gray_background.jpg"/>
					</ImageBrush.ImageSource>
				</ImageBrush>
			</Setter.Value>
			
		</Setter>
	</Style>
</ResourceDictionary>