Allow to add/remove multiple playlists from settings window
This commit is contained in:
+40
-16
@@ -3,21 +3,45 @@
|
||||
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:tv_player="clr-namespace:TV_Player"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<StackPanel x:Name="groupsGrid" VerticalAlignment="Center">
|
||||
<!--<StackPanel x:Name="AddPlayList" Visibility="Collapsed">-->
|
||||
<Label Margin="10" Foreground="White" FontSize="25" FontWeight="Bold" FontFamily="Arial">Адрес плейлиста</Label>
|
||||
<TextBox Margin="10" Style="{StaticResource TextBox}" HorizontalAlignment="Stretch" Text="{Binding PlaylistURL}"></TextBox>
|
||||
<Label Margin="10" Foreground="White" FontSize="25" FontWeight="Bold" FontFamily="Arial">Название</Label>
|
||||
<TextBox Margin="10" Style="{StaticResource TextBox}" HorizontalAlignment="Stretch" Text="{Binding PlaylistName}"></TextBox>
|
||||
<Button Grid.Column="1" Height="70" Width="70" Margin="10,0,50,0" Style="{DynamicResource ButtonConfirm}" Command="{Binding BackCommand}" />
|
||||
<!--</StackPanel>-->
|
||||
<CheckBox Margin="10" Foreground="White" FontSize="25" IsChecked="{Binding StartFullScreen}">Откывать во весь экран</CheckBox>
|
||||
<CheckBox Margin="10" Foreground="White" FontSize="25" IsChecked="{Binding StartLastScreen}">Запоминать последний выбор</CheckBox>
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
||||
<Button Grid.Column="1" Height="70" Width="70" Margin="10,0,50,0" Style="{DynamicResource ButtonBack}" Command="{Binding BackCommand}" />
|
||||
<Button HorizontalAlignment="Center" Height="70" Width="70" Style="{DynamicResource ButtonConfirm}" Command="{Binding SaveCommand}" />
|
||||
mc:Ignorable="d">
|
||||
<Viewbox>
|
||||
<StackPanel x:Name="groupsGrid" VerticalAlignment="Center">
|
||||
<Button HorizontalAlignment="Center" Height="70" Width="70" Style="{DynamicResource ButtonAdd}" Click="OpenAddPlayList_Click" />
|
||||
<ListView Height="250" ItemsSource="{Binding Playlists}" Background="Transparent" ScrollViewer.HorizontalScrollBarVisibility="Disabled">
|
||||
<ListView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid HorizontalAlignment="Stretch" Height="80">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="200"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="100"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Foreground="White" VerticalAlignment="Center" FontSize="25" FontWeight="Bold" Text="{Binding Key}" />
|
||||
<TextBlock Grid.Column="1" Foreground="White" VerticalAlignment="Center" FontSize="25" FontWeight="Bold" Text="{Binding Value}" />
|
||||
<Button Grid.Column="2" Height="70" Width="70" Style="{DynamicResource ButtonRemove}" CommandParameter="{Binding}"
|
||||
Command="{Binding DataContext.PlaylistDeleteCommand, RelativeSource={RelativeSource AncestorType=UserControl}}" />
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListView.ItemTemplate>
|
||||
<ListView.ItemContainerStyle>
|
||||
<Style TargetType="ListViewItem">
|
||||
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
||||
</Style>
|
||||
</ListView.ItemContainerStyle>
|
||||
</ListView>
|
||||
<StackPanel x:Name="AddPlayList" Visibility="Collapsed">
|
||||
<Label Margin="10" Foreground="White" FontSize="25" FontWeight="Bold" FontFamily="Arial">Адрес плейлиста</Label>
|
||||
<TextBox Margin="10" Style="{StaticResource TextBox}" HorizontalAlignment="Stretch" Text="{Binding PlaylistURL}"></TextBox>
|
||||
<Label Margin="10" Foreground="White" FontSize="25" FontWeight="Bold" FontFamily="Arial">Название</Label>
|
||||
<TextBox Margin="10" Style="{StaticResource TextBox}" HorizontalAlignment="Stretch" Text="{Binding PlaylistName}"></TextBox>
|
||||
<Button Grid.Column="1" Height="70" Width="70" Margin="10,0,50,0" Style="{DynamicResource ButtonConfirm}" Click="AddPlayList_Click" Command="{Binding AddPlaylistCommand}" />
|
||||
</StackPanel>
|
||||
<CheckBox Margin="10" Foreground="White" FontSize="25" IsChecked="{Binding StartFullScreen}">Откывать во весь экран</CheckBox>
|
||||
<CheckBox Margin="10" Foreground="White" FontSize="25" IsChecked="{Binding StartLastScreen}">Запоминать последний выбор</CheckBox>
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
||||
<Button Grid.Column="1" Height="70" Width="70" Margin="10,0,50,0" Style="{DynamicResource ButtonBack}" Command="{Binding BackCommand}" />
|
||||
<Button HorizontalAlignment="Center" Height="70" Width="70" Style="{DynamicResource ButtonConfirm}" Command="{Binding SaveCommand}" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Viewbox>
|
||||
</UserControl>
|
||||
|
||||
Reference in New Issue
Block a user