This repository has been archived by the owner on Dec 11, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainWindow.xaml
49 lines (48 loc) · 3.93 KB
/
MainWindow.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
<Window x:Class="LastDitchPlayer.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:LastDitchPlayer"
mc:Ignorable="d"
Title="LastDitchPlayer" Height="450" Width="800">
<Grid>
<ListBox ItemsSource="{Binding playlist.Tracks}" SelectedItem="{Binding Sitem}" x:Name="songList" HorizontalContentAlignment="Stretch" VerticalAlignment="Top" Height="255" Width="780" Margin="0,10,0,0">
<ListBox.ItemTemplate>
<DataTemplate>
<Border BorderBrush="Black" BorderThickness="1" CornerRadius="5" Padding="3">
<Grid Width="Auto">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="9*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<!-- Assumes MVVM and you wish to bind to properties and commands -->
<TextBlock Grid.Column="0" Text="{Binding Path=Name}"/>
<TextBlock Grid.Column="1" Text="{Binding Path=Length, StringFormat={}{0} min}"/>
</Grid>
</Border>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<ProgressBar x:Name="songProgress" HorizontalAlignment="Center" Height="6" Margin="0,270,0,0" VerticalAlignment="Top" Width="772" RenderTransformOrigin="0.5,0.5" HorizontalContentAlignment="Center" VerticalContentAlignment="Center">
<ProgressBar.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleY="-1"/>
<SkewTransform/>
<RotateTransform/>
<TranslateTransform/>
</TransformGroup>
</ProgressBar.RenderTransform>
</ProgressBar>
<ToggleButton Command="{Binding ChangeStrategyCommand}" x:Name="shuffleBtn" Content="⤮" HorizontalAlignment="Left" Margin="205,307,0,0" VerticalAlignment="Top" Height="45" Width="54" FontSize="20"/>
<ToggleButton Command="{Binding PlayCommand}" Click="playBtn_Click" x:Name="playBtn" HorizontalAlignment="Center" Margin="0,282,0,0" VerticalAlignment="Top" Height="90" Width="90" Content="" FontSize="40"/>
<ComboBox ItemsSource="{Binding States}" SelectedItem="{Binding Sstate}" x:Name="speedCombo" HorizontalAlignment="Right" Margin="0,307,175,0" VerticalAlignment="Top" Width="56" Height="40"/>
<Button Command="{Binding SavePlaylistCommand}" x:Name="savePlaylistBtn" Margin="14,284,0,0" Width="80" Height="30" Content="Save Playlist" HorizontalAlignment="Left" VerticalAlignment="Top"/>
<Button Command="{Binding OpenPlaylistCommand}" x:Name="openPlaylistBtn" Margin="14,319,0,0" Width="80" Height="30" Content="Open Playlist" HorizontalAlignment="Left" VerticalAlignment="Top"/>
<Button Command="{Binding OpenSongCommand}" x:Name="openSongBtn" Margin="14,354,0,0" Width="80" Height="30" Content="Open Song" HorizontalAlignment="Left" VerticalAlignment="Top"/>
<Button Command="{Binding UndoCommand}" x:Name="undoBttn" Margin="655,284,0,0" Width="35" Height="30" Content="Undo" HorizontalAlignment="Left" VerticalAlignment="Top"/>
<Button Command="{Binding RedoCommand}" x:Name="redoBttn" Margin="695,284,0,0" Width="34" Height="30" Content="Redo" HorizontalAlignment="Left" VerticalAlignment="Top"/>
<Button Command="{Binding PrevAudioCommand}" x:Name="prevBttn" Margin="285,304,450,84" Content="⯬" FontSize="24" />
<Button Command="{Binding NextAudioCommand}" x:Name="nextBttn" Margin="450,304,285,85" Content="⯮" FontSize="24" />
</Grid>
</Window>