XAML/Clock.xaml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<Window
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    WindowStyle="None"
    ResizeMode="NoResize"
    Background="Transparent"
>
    <Grid Margin="10">
        <Border BorderBrush="#333333" BorderThickness="1" Background="#333333" Grid.Column="1"
                CornerRadius="10" VerticalAlignment="Center"
                HorizontalAlignment="Center">
            <Grid Margin="10">
                <Grid.RowDefinitions>
                    <RowDefinition />
                    <RowDefinition />
                    <RowDefinition />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <TextBlock DataContext="{Binding CurrentValue}" Text="{Binding Date, StringFormat=\{0:D\}}" TextWrapping="Wrap" Margin="5" FontSize="15" Foreground="#28bf37" FontFamily="Consolas"/>
                <TextBlock DataContext="{Binding CurrentValue}" Text="{Binding Date, StringFormat=\{0:t\}}" TextWrapping="Wrap" Margin="5" FontSize="25" Foreground="#28bf37" FontFamily="Consolas" Grid.Row="2"/>
                <TextBlock DataContext="{Binding CurrentValue}" Text="{Binding TimeZone}" TextWrapping="Wrap" Margin="5" FontSize="15" Foreground="#28bf37" FontFamily="Consolas" Grid.Row="3"/>
            </Grid>
        </Border>
    </Grid>
</Window>