147 lines
7.0 KiB
XML

<Window x:Class="MyApp.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:MyApp"
mc:Ignorable="d"
Closing="Window_Closing"
Style="{StaticResource MainWindow}">
<Grid Background="Transparent">
<Grid.RowDefinitions>
<RowDefinition Height="20"/>
<RowDefinition />
<RowDefinition Height="70"/>
</Grid.RowDefinitions>
<DockPanel Grid.Row="0">
<Menu>
<MenuItem Header="Datoteka">
<MenuItem Header="Izhod" Click="MenuItem_Exit_Click"/>
<MenuItem Header="Shrani" Click="MenuItem_Save_Click"/>
<MenuItem Header="Uvozi" Click="MenuItem_Load_Click"/>
</MenuItem>
<MenuItem Header="Seznam">
<MenuItem Header="Dodaj" Click="MenuItem_Add_Click"/>
<MenuItem Header="Odstrani" Click="MenuItem_Remove_Click" IsEnabled="{Binding SelectedItems.Count, ElementName=PlayListView}"/>
<MenuItem Header="Uredi" Click="MenuItem_Edit_Click" IsEnabled="{Binding SelectedItems.Count, ElementName=PlayListView}"/>
</MenuItem>
<MenuItem Header="Orodje">
<MenuItem Header="Nastavitve" Click="MenuItem_Settings_Click"/>
</MenuItem>
</Menu>
</DockPanel>
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="150"/>
<ColumnDefinition Width="2"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<ListView Style="{StaticResource Playlist}" Name="PlayListView" SelectionChanged="PlayListView_SelectionChanged" MouseDoubleClick="PlayListView_MouseDoubleClick">
<ListView.ItemTemplate>
<DataTemplate>
<StackPanel>
<Label Name="Naslov" Content="{Binding Path=Name}"/>
<Image Source="{Binding Path=IconSource}" Style="{StaticResource SmallImage}"/>
</StackPanel>
<DataTemplate.Triggers>
<DataTrigger Binding="{Binding Path=IsPlaying }" Value="True">
<Setter TargetName="Naslov" Property="Foreground" Value="Green"/>
</DataTrigger>
</DataTemplate.Triggers>
</DataTemplate>
</ListView.ItemTemplate>
<ListView.ContextMenu>
<ContextMenu>
<MenuItem Header="Dodaj" Click="MenuItem_Add_Click" />
<MenuItem Header="Odstrani" Click="MenuItem_Remove_Click" />
<MenuItem Header="Uredi" Click="MenuItem_Edit_Click"/>
</ContextMenu>
</ListView.ContextMenu>
</ListView>
<GridSplitter Grid.Column="1" Width="2" HorizontalAlignment="Stretch"/>
<local:MediaController x:Name="MediaPlayer"
Grid.Column="2"
OnTimeChage="MediaPlayer_OnTimeChage"
OnMediaLoad="MediaPlayer_OnMediaLoad"/>
<Canvas HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Column="2">
<Ellipse Width="10" Height="10" Fill="Black" >
<Ellipse.Triggers>
<EventTrigger RoutedEvent="Ellipse.Loaded">
<BeginStoryboard>
<Storyboard RepeatBehavior="Forever" Duration="0:0:1">
<DoubleAnimationUsingPath Source="X" Storyboard.TargetProperty="(Canvas.Left)"
PathGeometry="{StaticResource Krozenje}" />
<DoubleAnimationUsingPath Source="Y" Storyboard.TargetProperty="(Canvas.Top)"
PathGeometry="{StaticResource Krozenje}" />
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Ellipse.Triggers>
</Ellipse>
</Canvas>
</Grid>
<Border Grid.Row="2" BorderBrush="Black" BorderThickness="2">
<Grid >
<Grid.RowDefinitions>
<RowDefinition Height="30"/>
<RowDefinition Height="40"/>
</Grid.RowDefinitions>
<DockPanel Grid.Row="0">
<Label Name="CurrentTime" Content="00:00:00"/>
<Label Content="/"/>
<Label Name="TotalTime" Content="00:00:00"/>
<Slider Name="ProgresBar"
Thumb.DragCompleted="ProgresBar_DragCompleted"
Thumb.DragStarted="ProgresBar_DragStarted"
Margin="5"/>
</DockPanel>
<StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Center">
<Button Click="PlayButton_Click" Style="{StaticResource ControllButton}">
<Image Name="PlayPouseImg" Source="pack://application:,,,/assets/play_icon.png"/>
</Button>
<Button Style="{StaticResource ControllButton}" Click="Rewind_Click">
<Image Source="pack://application:,,,/assets/next_icon.png" RenderTransformOrigin="0.5,0.5">
<Image.RenderTransform>
<ScaleTransform ScaleX="-1"/>
</Image.RenderTransform>
</Image>
</Button>
<Button Style="{StaticResource ControllButton}" Click="Stop_Click">
<Image Source="pack://application:,,,/assets/stop_icon.png" Margin="3"/>
</Button>
<Button Style="{StaticResource ControllButton}" Click="Forward_Click">
<Image Source="pack://application:,,,/assets/next_icon.png" />
</Button>
<Button Style="{StaticResource ControllButton}">
<Image Source="pack://application:,,,/assets/shuffle_icon.png"/>
</Button>
<Button Style="{StaticResource ControllButton}">
<Image Source="pack://application:,,,/assets/repeat_icon.png"/>
</Button>
</StackPanel>
</Grid>
</Border>
</Grid>
</Window>