-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathWidget1.xaml
127 lines (116 loc) · 9.63 KB
/
Widget1.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
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
<Page
x:Class="YouTubeMusicDesktopWidget.Widget1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:YouTubeMusicDesktopWidget"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"
Width="410"
Height="130">
<Page.Resources>
<Style x:Key="ButtonStyle" TargetType="Button">
<Setter Property="Background" Value="{ThemeResource ButtonBackground}"/>
<Setter Property="BackgroundSizing" Value="OuterBorderEdge"/>
<Setter Property="Foreground" Value="{ThemeResource ButtonForeground}"/>
<Setter Property="BorderBrush" Value="{ThemeResource ButtonBorderBrush}"/>
<Setter Property="BorderThickness" Value="{ThemeResource ButtonBorderThemeThickness}"/>
<Setter Property="Padding" Value="{StaticResource ButtonPadding}"/>
<Setter Property="HorizontalAlignment" Value="Left"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}"/>
<Setter Property="FontWeight" Value="Normal"/>
<Setter Property="FontSize" Value="{ThemeResource ControlContentThemeFontSize}"/>
<Setter Property="UseSystemFocusVisuals" Value="{StaticResource UseSystemFocusVisuals}"/>
<Setter Property="FocusVisualMargin" Value="-3"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<ContentPresenter x:Name="ContentPresenter" AutomationProperties.AccessibilityView="Raw" BackgroundSizing="{TemplateBinding BackgroundSizing}" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" CornerRadius="{TemplateBinding CornerRadius}" ContentTransitions="{TemplateBinding ContentTransitions}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Padding="{TemplateBinding Padding}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal">
<Storyboard>
<PointerUpThemeAnimation Storyboard.TargetName="ContentPresenter"/>
</Storyboard>
</VisualState>
<VisualState x:Name="PointerOver">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="BorderBrush">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlAcrylicElementBrush}"/>
</ObjectAnimationUsingKeyFrames>
<PointerUpThemeAnimation Storyboard.TargetName="ContentPresenter"/>
</Storyboard>
</VisualState>
<VisualState x:Name="Pressed">
<Storyboard>
<PointerDownThemeAnimation Storyboard.TargetName="ContentPresenter"/>
</Storyboard>
</VisualState>
<VisualState x:Name="Disabled">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ButtonBackgroundDisabled}"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="BorderBrush">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ButtonBorderBrushDisabled}"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ButtonForegroundDisabled}"/>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
</ContentPresenter>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Page.Resources>
<StackPanel Orientation="Horizontal" Padding="3" Background="#222">
<StackPanel BorderBrush="#666" Width="auto" Height="auto" Background="#333">
<Image x:Name="coverImage" Width="124" Height="124"></Image>
</StackPanel>
<StackPanel Orientation="Vertical" Margin="5,0,0,0">
<StackPanel Width="275" Height="72" HorizontalAlignment="Left" VerticalAlignment="Top">
<TextBlock x:Name="trackTitle" Text="-" Padding="0,0,0,5" Canvas.ZIndex="1" MaxWidth="280" Width="auto" Height="23" VerticalAlignment="Top" HorizontalAlignment="Left" TextTrimming="CharacterEllipsis" FontWeight="Bold"/>
<TextBlock x:Name="trackAuthor" Text="-" Padding="0,0,0,5" Canvas.ZIndex="1" MaxWidth="280" Width="auto" Height="23" VerticalAlignment="Top" HorizontalAlignment="Left" TextTrimming="CharacterEllipsis" FontSize="12"/>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="0,2,0,0">
<TextBlock x:Name="playerCurrentTime" Text="0:00" Width="30" Padding="0,4,0,0"></TextBlock>
<!--Slider x:Name="trackSeekTime" Width="208" Height="25" RequestedTheme="Default" Foreground="Red" TickPlacement="Inline" CanDrag="True" PointerEntered="Slider_PointerEntered" PointerExited="Slider_PointerExited" ValueChanged="Slider_ValueChanged" /-->
<ProgressBar x:Name="trackSeekTime" Width="208" Margin="0,5,0,0" Foreground="#CCFF0000"></ProgressBar>
<TextBlock x:Name="trackDurationTime" Text="0:00" Width="30" Padding="5,4,0,0"></TextBlock>
</StackPanel>
</StackPanel>
<StackPanel Orientation="Horizontal" Width="275" Height="55" HorizontalAlignment="Left" VerticalAlignment="Bottom" Spacing="12">
<Button Style="{StaticResource ButtonStyle}" x:Name="ThumbDownButton" Click="ThumbDownButton_Click" Content="
" Height="36" Width="36" VerticalAlignment="Center" BackgroundSizing="InnerBorderEdge">
<Button.Background>
<ImageBrush ImageSource="/Assets/Icons/ic_thumb_down_outlined_white_36dp.png" Stretch="Uniform" x:Name="thumbDownButtonBg"/>
</Button.Background>
</Button>
<Button Style="{StaticResource ButtonStyle}" x:Name="PreviousButton" Click="PreviousButton_Click" Content="
" Height="48" Width="48" VerticalAlignment="Center" BackgroundSizing="OuterBorderEdge">
<Button.Background>
<ImageBrush ImageSource="/Assets/Icons/ic_skip_previous_white_36dp.png" Stretch="Uniform"/>
</Button.Background>
</Button>
<Button Style="{StaticResource ButtonStyle}" x:Name="PlayPauseButton" Click="PlayPauseButton_Click" Content="
" Height="48" Width="48" VerticalAlignment="Center" BackgroundSizing="OuterBorderEdge">
<Button.Background>
<ImageBrush ImageSource="/Assets/Icons/ic_play_arrow_white_48dp.png" Stretch="Uniform" x:Name="playPauseButtonBg"/>
</Button.Background>
</Button>
<Button Style="{StaticResource ButtonStyle}" x:Name="NextButton" Click="NextButton_Click" Content="
" Height="48" Width="48" VerticalAlignment="Center" BackgroundSizing="OuterBorderEdge">
<Button.Background>
<ImageBrush ImageSource="/Assets/Icons/ic_skip_next_white_36dp.png"/>
</Button.Background>
</Button>
<Button Style="{StaticResource ButtonStyle}" x:Name="ThumbUpButton" Click="ThumbUpButton_Click" Content="
" Height="36" Width="46" VerticalAlignment="Center" BackgroundSizing="InnerBorderEdge" FontSize="14" ScrollViewer.VerticalScrollBarVisibility="Disabled">
<Button.Background>
<ImageBrush ImageSource="/Assets/Icons/ic_thumb_up_outlined_white_36dp.png" x:Name="thumbUpButtonBg" Stretch="Uniform"/>
</Button.Background>
</Button>
</StackPanel>
</StackPanel>
</StackPanel>
</Page>