-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTimerView.xaml
More file actions
46 lines (45 loc) · 2.69 KB
/
TimerView.xaml
File metadata and controls
46 lines (45 loc) · 2.69 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
<Window xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml" x:Class="SimpleUsefulTimer.TimerView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:SimpleUsefulTimer"
mc:Ignorable="d"
SizeToContent="WidthAndHeight"
Name="TimerViewWindow" Topmost="True" Title="TimerView" DataContext="{Binding RelativeSource={RelativeSource AncestorType=local:TimerControl}}" AllowsTransparency="True" Background="Transparent" WindowStyle="None" Closed="Window_Closed" Loaded="Window_Loaded" MouseDown="Window_MouseDown" MouseRightButtonUp="TimerViewWindow_MouseRightButtonUp">
<Window.Resources>
<local:IntToVisibilityConverter x:Key="IntToVisibilityConverter" />
<local:IntToVerticalAlignmentConverter x:Key="IntToVerticalAlignmentConverter" />
</Window.Resources>
<StackPanel Name="TimerViewContainer" Orientation="Horizontal" Background="{Binding MainTimerBackground}">
<TextBlock Background="{Binding MainTimerBackground}"
Name="MainTimer"
Text="{Binding Timer, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
FontFamily="{Binding TimerCustomFont}"
FontSize="{Binding TimerFontSize, Mode=TwoWay}"
FontWeight="Bold"
Foreground="{Binding MainTimerForeground, Mode=OneWay}"
>
</TextBlock>
<TextBlock
Name="MainTimerMs"
Text="{Binding TimerMs, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
FontFamily="{Binding TimerCustomFont}"
FontSize="{Binding AdjustedTimerFontSize}"
FontWeight="Bold"
Foreground="{Binding MainTimerForeground, Mode=OneWay}"
Visibility="{Binding MsFieldAlignment, Converter={StaticResource IntToVisibilityConverter}}"
VerticalAlignment="{Binding MsFieldAlignment, Converter={StaticResource IntToVerticalAlignmentConverter}}"
IsVisibleChanged="MainTimerMs_IsVisibleChanged"
Margin="0,0,15,0"
>
</TextBlock>
<ui:Flyout Name="RightClickActionContainer" >
<StackPanel Orientation="Horizontal">
<Button Name="CloseTimerAction" Content="Close" Click="CloseTimerAction_Click"/>
<Button Name="OpenTimerConfigAction" Content="Config" Click="OpenTimerConfigAction_Click"/>
<Button Name="Github" Content="My github" Click="Github_Click"/>
</StackPanel>
</ui:Flyout>
</StackPanel>
</Window>