-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainWindow.xaml
More file actions
37 lines (37 loc) · 2.9 KB
/
MainWindow.xaml
File metadata and controls
37 lines (37 loc) · 2.9 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
<Window x:Class="FlashyTimer.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:FlashyTimer"
xmlns:vm="clr-namespace:FlashyTimer.ViewModels"
mc:Ignorable="d"
Title="Flashy Timer v0.2" Height="240" Width="640">
<Window.Resources>
<vm:TimerViewModel x:Key="TimerVM"/>
</Window.Resources>
<Grid Background="{Binding Background, Source={StaticResource TimerVM}}">
<TextBlock x:Name="textBlock" HorizontalAlignment="Center" TextWrapping="Wrap" Text="{Binding Text, Source={StaticResource TimerVM}}" VerticalAlignment="Center" FontSize="72" FontFamily="Courier New" FontWeight="Bold" TextAlignment="Right" Background="{Binding BackgroundColor, Source={StaticResource TimerVM}}"/>
<ListView ItemsSource="{Binding StartOptions, Source={StaticResource TimerVM}}" VerticalAlignment="Bottom" HorizontalAlignment="Left" BorderBrush="Transparent" Foreground="Transparent" Background="Transparent" >
<ListView.ItemTemplate>
<DataTemplate x:Name="StartButtonTemplate" DataType="vm:TimeSettingsViewModel">
<Button Content="{Binding Name}" Command="{Binding StartCommand}" Background="#FF56FF34" FontSize="20" Margin="3" Width="100" />
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
<ListView ItemsSource="{Binding TimeAdjusters, Source={StaticResource TimerVM}}" VerticalAlignment="Top" HorizontalAlignment="Right" Width="128" Margin="0,0,0,89" BorderBrush="Transparent" Foreground="Transparent" Background="Transparent">
<ListView.ItemTemplate>
<DataTemplate x:Name="TimeAdjusterTemplate" DataType="vm:TimeAdjusterViewModel">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
<Button Content="{Binding AddLabel}" Command="{Binding AddCommand}" Width="54" FontSize="15" Margin="0,2,2,2" />
<Button Content="{Binding SubtractLabel}" Command="{Binding SubtractCommand}" Width="54" FontSize="15" Margin="2,2,0,2" />
</StackPanel>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
<StackPanel Width="128" VerticalAlignment="Bottom" HorizontalAlignment="Right" >
<Button x:Name="buttonPauseResume" Command="{Binding PauseResumeCommand, Source={StaticResource TimerVM}}" Content="Pause/Resume" Margin="7" FontSize="16" />
<Button x:Name="buttonStop" Command="{Binding StopCommand, Source={StaticResource TimerVM}}" Content="Stop" FontSize="20" Margin="7" Background="#FFFF7878" BorderBrush="#FF803A3A" />
</StackPanel>
</Grid>
</Window>