📄
src/App/Views/MainView.axaml
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
<UserControl 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:vm="using:MMirror.App.ViewModels"
mc:Ignorable="d" d:DesignWidth="720" d:DesignHeight="1280"
x:Class="MMirror.App.Views.MainView"
x:DataType="vm:MainViewModel">
<Design.DataContext>
<vm:MainViewModel />
</Design.DataContext>
<UserControl.Styles>
<Style Selector="Grid.fade">
<Setter Property="RenderTransform" Value="translateY(10px)" />
<Setter Property="Transitions">
<Transitions>
<TransformOperationsTransition Property="RenderTransform" Duration="{StaticResource FadeInDuration}" Easing="{StaticResource FadeInEasing}" />
</Transitions>
</Setter>
</Style>
<Style Selector=".active Grid.fade">
<Setter Property="RenderTransform" Value="translateY(0px)" />
</Style>
<Style Selector="Rectangle">
<Setter Property="Opacity" Value="0.95" />
<Setter Property="Transitions">
<Transitions>
<DoubleTransition Property="Opacity" Duration="{StaticResource FadeInDuration}" Easing="{StaticResource FadeInEasing}" />
</Transitions>
</Setter>
</Style>
<Style Selector=".active Rectangle">
<Setter Property="Opacity" Value="0" />
</Style>
</UserControl.Styles>
<Panel Classes.active="{Binding FaceNear}" Margin="64">
<Grid Classes="fade" ColumnDefinitions="*,*,*">
<StackPanel Grid.Column="0" Grid.IsSharedSizeScope="True" Spacing="8">
<ContentControl Content="{Binding Weather}" />
<ContentControl Content="{Binding Olskrokstorget}" />
<ContentControl Content="{Binding Svingeln}" />
</StackPanel>
<ContentControl Grid.Column="2" Content="{Binding UpperRight}" />
</Grid>
<Rectangle Fill="#000000" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" IsHitTestVisible="False" />
</Panel>
</UserControl>