<Window x:Class="WpfApp1.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:WpfApp1"        
        xmlns:mw="clr-namespace:WpfApp1.ModelWidoku"
        xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
        mc:Ignorable="d"
        Background="Transparent"
        Opacity="0.75" AllowsTransparency="True" WindowStyle="None"
        Title="ZegarWPF" Height="550" Width="500" ResizeMode="NoResize">
    <i:Interaction.Behaviors>
        <local:ZmianaPołożeniaOknaZaDowolnyPunkt />
    </i:Interaction.Behaviors>
    <Window.DataContext>
        <mw:Zegar />
    </Window.DataContext>
    <Window.Resources>
        <Style TargetType="TextBlock">
            <Setter Property="Margin" Value="0" />
            <Setter Property="Foreground" Value="Black" />
            <Setter Property="FontFamily" Value="Calibri" />
            <Setter Property="TextAlignment" Value="Center" />
        </Style>
        <Style TargetType="Line">
            <Setter Property="Stroke" Value="Black" />
            <Setter Property="StrokeEndLineCap" Value="Round" />
            <Setter Property="StrokeStartLineCap" Value="Round" />
        </Style>
        <local:KonwerterKątaWskazówek x:Key="wskazówkaGodzinowa" Wskazówka="Godzinowa" />
        <local:KonwerterKątaWskazówek x:Key="wskazówkaMinutowa" Wskazówka="Minutowa" />
        <local:KonwerterKątaWskazówek x:Key="wskazówkaSekundowa" Wskazówka="Sekundowa" />
    </Window.Resources>
    <Canvas>
        <Ellipse Canvas.Left="50" Canvas.Top="15"
                     Height="400" Width="400"
                     StrokeThickness="2" Stroke="Black">
            <Ellipse.Fill>
                <RadialGradientBrush GradientOrigin="0.5, 0.5">
                    <GradientStop Offset="1" Color="#DDDDDD" />
                    <GradientStop Offset="0.75" Color="#EEEEEE" />
                    <GradientStop Offset="0" Color="White" />
                </RadialGradientBrush>
            </Ellipse.Fill>
        </Ellipse>
            <TextBlock Canvas.Left="150" Canvas.Top="255" Foreground="#888888"
                       FontSize="30" Text="{Binding Path=AktualnyCzas, Mode=OneWay, StringFormat={}{0:dd MMMM yyyy}, ConverterCulture=pl-PL}" />
        <TextBlock Canvas.Left="180" Canvas.Top="285" Foreground="#888888"
                   FontSize="40" Text="{Binding Path=AktualnyCzas, Mode=OneWay, StringFormat={}{0:hh:mm:ss}, ConverterCulture=pl-PL}" />
            
            <TextBlock Text="12" FontSize="75" Foreground="DarkGray"
                       Canvas.Left="210" Canvas.Top="10" />
        <TextBlock Text="3" FontSize="75" Foreground="DarkGray"
                       Canvas.Left="390" Canvas.Top="165" />
        <TextBlock Text="6" FontSize="75" Foreground="DarkGray"
                       Canvas.Left="230" Canvas.Top="325" />
        <TextBlock Text="9" FontSize="75" Foreground="DarkGray"
                       Canvas.Left="70" Canvas.Top="165" />
        <Line Canvas.Left="250" Canvas.Top="210"
                  StrokeThickness="4"
                  X1="0" Y1="0"
                  X2="0" Y2="-75">
            <Line.Effect>
                <DropShadowEffect />
            </Line.Effect>
            <Line.RenderTransform>
                <RotateTransform 
                        Angle="{Binding Path=AktualnyCzas, Mode=OneWay, 
                        Converter={StaticResource ResourceKey=wskazówkaGodzinowa}}" />
            </Line.RenderTransform>
        </Line>
        <Line Canvas.Left="250" Canvas.Top="210"
                  StrokeThickness="2"
                  X1="0" Y1="0"
                  X2="0" Y2="-150">
            <Line.Effect>
                <DropShadowEffect />
            </Line.Effect>
            <Line.RenderTransform>
                <RotateTransform 
                        Angle="{Binding Path=AktualnyCzas, Mode=OneWay, 
                        Converter={StaticResource ResourceKey=wskazówkaMinutowa}}" />
            </Line.RenderTransform>
        </Line>
        <Line Canvas.Left="250" Canvas.Top="210"
                  StrokeThickness="1"
                  X1="0" Y1="0"
                  X2="0" Y2="-150">
            <Line.Effect>
                <DropShadowEffect />
            </Line.Effect>
            <Line.RenderTransform>
                <RotateTransform 
                        Angle="{Binding Path=AktualnyCzas, Mode=OneWay, 
                        Converter={StaticResource ResourceKey=wskazówkaSekundowa}}" />
            </Line.RenderTransform>
        </Line>
        <Ellipse Canvas.Left="240" Canvas.Top="200"
                     Height="20" Width="20"
                     Fill="Black" Stroke="Black" />
    </Canvas>
</Window>
