-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainWindow.axaml
More file actions
57 lines (57 loc) · 2.81 KB
/
MainWindow.axaml
File metadata and controls
57 lines (57 loc) · 2.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<Window xmlns="https://github.com/avaloniaui"
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="using:dotnetPiPictureFrame"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="dotnetPiPictureFrame.MainWindow"
Title="Picture Frame"
SystemDecorations="None"
WindowState="FullScreen"
Topmost="true"
Background="#011627"
Cursor="None">
<Window.Resources>
<local:TimeConverter x:Key="timeConverter"/>
<local:WeatherConverter x:Key="weatherConverter"/>
<local:PhotoConverter x:Key="photoConverter"/>
</Window.Resources>
<Window.Styles>
<Style Selector="TextBlock.info">
<Setter Property="FontSize" Value="38"/>
<Setter Property="FontWeight" Value="Bold"/>
<Setter Property="FontFamily" Value="Consolas" />
<Setter Property="Foreground" Value="White" />
</Style>
<Style Selector="TextBlock.back">
<Setter Property="FontSize" Value="38"/>
<Setter Property="FontWeight" Value="Bold"/>
<Setter Property="FontFamily" Value="Consolas" />
<Setter Property="Foreground" Value="Black" />
</Style>
</Window.Styles>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="50"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="50"></RowDefinition>
</Grid.RowDefinitions>
<TransitioningContentControl Grid.Row="0" Grid.RowSpan="3" Content="{Binding PhotoPath, Converter={StaticResource photoConverter}}" >
<TransitioningContentControl.PageTransition>
<CompositePageTransition>
<CrossFade Duration="0:00:00.500" />
<PageSlide Duration="0:00:00.500" Orientation="Horizontal" />
</CompositePageTransition>
</TransitioningContentControl.PageTransition>
<TransitioningContentControl.ContentTemplate>
<DataTemplate DataType="Bitmap">
<Image Source="{Binding}" />
</DataTemplate>
</TransitioningContentControl.ContentTemplate>
</TransitioningContentControl>
<TextBlock Grid.Row="0" Margin ="6" Classes="back" Text="{Binding CurrentWeather, Converter={StaticResource weatherConverter}}" />
<TextBlock Grid.Row="0" Margin ="5" Classes="info" Text="{Binding CurrentWeather, Converter={StaticResource weatherConverter}}" />
<TextBlock Grid.Row="2" Margin ="6" Classes="back" Text="{Binding Time, Converter={StaticResource timeConverter}}" />
<TextBlock Grid.Row="2" Margin ="5" Classes="info" Text="{Binding Time, Converter={StaticResource timeConverter}}" />
</Grid>
</Window>