|
3 | 3 | xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
4 | 4 | xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
5 | 5 | xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
| 6 | + xmlns:viewModel="clr-namespace:LiveWriterPluginManager.ViewModel" |
6 | 7 | mc:Ignorable="d" |
7 | 8 | d:DesignHeight="300" |
8 | 9 | d:DesignWidth="300" |
9 | 10 | DataContext="{Binding CreatePackage, Source={StaticResource Locator}}"> |
| 11 | + |
| 12 | + <UserControl.Resources> |
| 13 | + <DataTemplate DataType="{x:Type viewModel:FileViewModel}"> |
| 14 | + <Border BorderBrush="{StaticResource LiveWriterPurpleBrush}" |
| 15 | + BorderThickness="0,0,0,1" |
| 16 | + Padding="10"> |
| 17 | + <Grid> |
| 18 | + <Grid.ColumnDefinitions> |
| 19 | + <ColumnDefinition Width="*" /> |
| 20 | + <ColumnDefinition Width="Auto" /> |
| 21 | + </Grid.ColumnDefinitions> |
| 22 | + |
| 23 | + <TextBlock Text="{Binding Name}" |
| 24 | + VerticalAlignment="Center"/> |
| 25 | + |
| 26 | + <Button Grid.Column="1" |
| 27 | + Style="{StaticResource MaterialDesignFloatingActionMiniAccentButton}" |
| 28 | + Height="30" |
| 29 | + Width="30" |
| 30 | + Command="{Binding RemoveFileCommand}"> |
| 31 | + <Viewbox Stretch="Uniform" |
| 32 | + StretchDirection="DownOnly" |
| 33 | + Width="20" |
| 34 | + Height="20" |
| 35 | + HorizontalAlignment="Center" |
| 36 | + VerticalAlignment="Center"> |
| 37 | + <Path Height="15" |
| 38 | + Width="10" |
| 39 | + Stretch="Fill" |
| 40 | + Fill="White" |
| 41 | + Data="M19,4H15.5L14.5,3H9.5L8.5,4H5V6H19M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19Z" /> |
| 42 | + </Viewbox> |
| 43 | + </Button> |
| 44 | + </Grid> |
| 45 | + </Border> |
| 46 | + </DataTemplate> |
| 47 | + </UserControl.Resources> |
10 | 48 | <Grid> |
11 | 49 | <Grid.RowDefinitions> |
12 | | - <RowDefinition Height="Auto"/> |
13 | | - <RowDefinition Height="*"/> |
| 50 | + <RowDefinition Height="Auto" /> |
| 51 | + <RowDefinition Height="*" /> |
| 52 | + <RowDefinition Height="Auto" /> |
14 | 53 | </Grid.RowDefinitions> |
| 54 | + |
| 55 | + <StackPanel> |
| 56 | + <TextBlock Text="Please choose the files that you would like to add to your package." |
| 57 | + TextWrapping="WrapWithOverflow" |
| 58 | + Margin="10" /> |
| 59 | + <Button Content="Add files" |
| 60 | + HorizontalAlignment="Left" |
| 61 | + Margin="10,0,10,10" |
| 62 | + Command="{Binding AddFilesCommand}" /> |
| 63 | + </StackPanel> |
| 64 | + |
| 65 | + <ListView ItemsSource="{Binding Files}" |
| 66 | + Grid.Row="1" /> |
| 67 | + |
| 68 | + <Button Content="Create package" |
| 69 | + Grid.Row="2" |
| 70 | + HorizontalAlignment="Right" |
| 71 | + Margin="10" |
| 72 | + IsEnabled="{Binding IsValidPackage}" /> |
15 | 73 | </Grid> |
16 | 74 | </UserControl> |
0 commit comments