|
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.UpdateSubmodules"
|
|
10 | 11 | <TextBlock FontSize="18"
|
11 | 12 | Classes="bold"
|
12 | 13 | Text="{DynamicResource Text.UpdateSubmodules}"/>
|
13 |
| - <Grid Margin="0,16,0,0" RowDefinitions="32,32,32,32,32" ColumnDefinitions="120,*"> |
| 14 | + <Grid Margin="0,16,0,0" RowDefinitions="32,Auto,32,32,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"
|
|
19 | 20 | Height="28" Padding="8,0"
|
20 | 21 | VerticalAlignment="Center" HorizontalAlignment="Stretch"
|
21 | 22 | ItemsSource="{Binding Submodules}"
|
22 |
| - SelectedItem="{Binding SelectedSubmodule, Mode=TwoWay}" |
23 |
| - IsEnabled="{Binding !UpdateAll}"> |
| 23 | + SelectedItem="{Binding SelectedSubmodule, Mode=TwoWay}"> |
| 24 | + <ComboBox.IsEnabled> |
| 25 | + <MultiBinding Converter="{x:Static BoolConverters.And}"> |
| 26 | + <Binding Path="UpdateAll" Converter="{x:Static BoolConverters.Not}"/> |
| 27 | + <Binding Path="HasPreSelectedSubmodule" Converter="{x:Static BoolConverters.Not}"/> |
| 28 | + </MultiBinding> |
| 29 | + </ComboBox.IsEnabled> |
| 30 | + |
24 | 31 | <ComboBox.ItemTemplate>
|
25 |
| - <DataTemplate x:DataType="x:String"> |
| 32 | + <DataTemplate x:DataType="m:Submodule"> |
26 | 33 | <StackPanel Orientation="Horizontal" Height="20" VerticalAlignment="Center">
|
27 | 34 | <Path Margin="0,0,8,0" Width="14" Height="14" Fill="{DynamicResource Brush.FG1}" Data="{StaticResource Icons.Submodule}"/>
|
28 |
| - <TextBlock Text="{Binding}"/> |
| 35 | + <TextBlock Text="{Binding Path, Mode=OneWay}"/> |
29 | 36 | </StackPanel>
|
30 | 37 | </DataTemplate>
|
31 | 38 | </ComboBox.ItemTemplate>
|
32 | 39 | </ComboBox>
|
33 | 40 |
|
34 | 41 | <CheckBox Grid.Row="1" Grid.Column="1"
|
| 42 | + Height="32" |
35 | 43 | Content="{DynamicResource Text.UpdateSubmodules.All}"
|
36 |
| - IsChecked="{Binding UpdateAll, Mode=TwoWay}"/> |
| 44 | + IsChecked="{Binding UpdateAll, Mode=TwoWay}" |
| 45 | + IsVisible="{Binding !HasPreSelectedSubmodule, Mode=OneWay}"/> |
37 | 46 |
|
38 | 47 | <CheckBox Grid.Row="2" Grid.Column="1"
|
39 | 48 | Content="{DynamicResource Text.UpdateSubmodules.Init}"
|
|
0 commit comments