|
3 | 3 | xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
4 | 4 | xmlns:System="clr-namespace:System;assembly=mscorlib" xmlns:local="clr-namespace:PlaylistGenerator" x:Class="PlaylistGenerator.MainWindow" |
5 | 5 | xmlns:scm="clr-namespace:System.ComponentModel;assembly=WindowsBase" |
6 | | - Height="431" Width="409" WindowStartupLocation="CenterScreen" UseLayoutRounding="True"> |
| 6 | + Height="431" Width="409" WindowStartupLocation="CenterScreen" UseLayoutRounding="True" AllowDrop="True" Drop="Window_Drop" PreviewDragOver="Window_PreviewDragOver"> |
7 | 7 | <Window.DataContext> |
8 | 8 | <local:MainWindowViewModel/> |
9 | 9 | </Window.DataContext> |
10 | 10 | <Grid> |
11 | 11 | <Label Margin="10,7,0,0" Content="Directory" VerticalAlignment="Top" HorizontalAlignment="Left"/> |
12 | | - <TextBox x:Name="directory" Height="23" TextWrapping="Wrap" VerticalAlignment="Top" Margin="73,10,86,0" Text="{Binding Directory, UpdateSourceTrigger=PropertyChanged}"/> |
| 12 | + <TextBox x:Name="directory" Height="23" VerticalAlignment="Top" Margin="73,10,86,0" Text="{Binding Directory, UpdateSourceTrigger=PropertyChanged}"/> |
13 | 13 | <Button x:Name="browse" Content="Browse" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,10,10,0" Height="23" Click="browse_Click" Width="71"/> |
14 | 14 | <Label Content="File type" HorizontalAlignment="Left" Margin="10,38,0,0" VerticalAlignment="Top"/> |
15 | 15 | <ComboBox VerticalAlignment="Top" Margin="69,42,10,0" SelectedValuePath="Key" SelectedValue="{Binding SelectedFileType}" IsEnabled="{Binding Files, TargetNullValue=false}"> |
|
32 | 32 | </DataTemplate> |
33 | 33 | </ComboBox.ItemTemplate> |
34 | 34 | </ComboBox> |
| 35 | + <!-- Read-only ListBox --> |
35 | 36 | <ListBox ItemsSource="{Binding SelectedFiles}" Margin="10,73,10,66" IsEnabled="{Binding Files, TargetNullValue=false}"> |
36 | 37 | <ListBox.Resources> |
| 38 | + <!-- Hide item selection highlight. --> |
37 | 39 | <SolidColorBrush x:Key="{x:Static SystemColors.HighlightTextBrushKey}" Color="{StaticResource {x:Static SystemColors.ControlTextColorKey}}"/> |
38 | | - <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Opacity="0"/> |
| 40 | + <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Opacity="0"/> |
39 | 41 | <SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightBrushKey}" Opacity="0"/> |
40 | 42 | </ListBox.Resources> |
| 43 | + <ListBox.ItemContainerStyle> |
| 44 | + <!-- Hide item focus border. --> |
| 45 | + <Style TargetType="{x:Type ListBoxItem}"> |
| 46 | + <Setter Property="FocusVisualStyle" Value="{x:Null}"/> |
| 47 | + </Style> |
| 48 | + </ListBox.ItemContainerStyle> |
41 | 49 | </ListBox> |
42 | 50 | <Button x:Name="generate" Content="Generate" HorizontalAlignment="Center" VerticalAlignment="Bottom" Height="25" IsDefault="True" Margin="0,0,0,31" Click="generate_Click" IsEnabled="{Binding Files, TargetNullValue=false}" Width="80"/> |
43 | 51 | <StatusBar Height="21" VerticalAlignment="Bottom" BorderThickness="0,1,0,0" BorderBrush="{StaticResource {x:Static SystemColors.ActiveBorderBrushKey}}"> |
|
0 commit comments