|
2 | 2 | xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
3 | 3 | xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
4 | 4 | xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
| 5 | + xmlns:m="using:SourceGit.Models" |
5 | 6 | xmlns:vm="using:SourceGit.ViewModels" |
6 | 7 | mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" |
7 | 8 | x:Class="SourceGit.Views.ScanRepositories" |
|
10 | 11 | <TextBlock FontSize="18" |
11 | 12 | Classes="bold" |
12 | 13 | Text="{DynamicResource Text.ScanRepositories}"/> |
13 | | - <Grid Margin="0,16,0,0" RowDefinitions="32" ColumnDefinitions="130,*"> |
| 14 | + <Grid Margin="0,16,0,0" RowDefinitions="32" ColumnDefinitions="120,*"> |
14 | 15 | <TextBlock Grid.Row="0" Grid.Column="0" |
15 | 16 | HorizontalAlignment="Right" VerticalAlignment="Center" |
16 | 17 | Margin="0,0,8,0" |
17 | 18 | Text="{DynamicResource Text.ScanRepositories.RootDir}"/> |
| 19 | + <ComboBox Grid.Row="0" Grid.Column="1" |
| 20 | + Height="28" Padding="4,0" |
| 21 | + VerticalAlignment="Center" HorizontalAlignment="Stretch" |
| 22 | + ItemsSource="{Binding ScanDirs, Mode=OneWay}" |
| 23 | + SelectedItem="{Binding Selected, Mode=TwoWay}"> |
| 24 | + <ComboBox.ItemTemplate> |
| 25 | + <DataTemplate DataType="m:ScanDir"> |
| 26 | + <Grid ColumnDefinitions="20,*,Auto"> |
| 27 | + <Path Grid.Column="0" |
| 28 | + Width="12" Height="12" |
| 29 | + Data="{StaticResource Icons.Folder}" |
| 30 | + Fill="{DynamicResource Brush.FG1}"/> |
18 | 31 |
|
19 | | - <Grid Grid.Row="0" Grid.Column="1" ColumnDefinitions="Auto,*"> |
20 | | - <Path Grid.Column="0" Width="14" Height="14" Margin="0,4,0,0" Data="{StaticResource Icons.Folder}"/> |
21 | | - <TextBlock Grid.Column="1" VerticalAlignment="Center" Text="{Binding RootDir}" Margin="4,0,0,0" TextTrimming="CharacterEllipsis"/> |
22 | | - </Grid> |
| 32 | + <TextBlock Grid.Column="1" Margin="4,0" Text="{Binding Path}" VerticalAlignment="Center"/> |
| 33 | + |
| 34 | + <Border Grid.Column="2" Height="16" Background="Green" CornerRadius="8" VerticalAlignment="Center"> |
| 35 | + <TextBlock Classes="primary" Text="{Binding Desc}" Margin="8,0" FontSize="10" Foreground="White"/> |
| 36 | + </Border> |
| 37 | + </Grid> |
| 38 | + </DataTemplate> |
| 39 | + </ComboBox.ItemTemplate> |
| 40 | + </ComboBox> |
23 | 41 | </Grid> |
24 | 42 | </StackPanel> |
25 | 43 | </UserControl> |
0 commit comments