|
7 | 7 | xmlns:c="using:SourceGit.Converters"
|
8 | 8 | mc:Ignorable="d" d:DesignWidth="500" d:DesignHeight="450"
|
9 | 9 | x:Class="SourceGit.Views.ExecuteCustomAction"
|
10 |
| - x:DataType="vm:ExecuteCustomAction"> |
| 10 | + x:DataType="vm:ExecuteCustomAction" |
| 11 | + Loaded="OnLoaded"> |
11 | 12 | <StackPanel Orientation="Vertical" Margin="8,0">
|
12 | 13 | <TextBlock FontSize="18"
|
13 | 14 | Classes="bold"
|
|
24 | 25 | <DataTemplate DataType="m:Null">
|
25 | 26 | <StackPanel Orientation="Horizontal">
|
26 | 27 | <Path Width="14" Height="14" Data="{StaticResource Icons.Repositories}"/>
|
27 |
| - <SelectableTextBlock VerticalAlignment="Center" Text="{DynamicResource Text.ExecuteCustomAction.Repository}" Margin="8,0,0,0"/> |
| 28 | + <SelectableTextBlock VerticalAlignment="Center" Text="{DynamicResource Text.ExecuteCustomAction.Repository}" Margin="8,0,0,0" IsTabStop="False"/> |
28 | 29 | </StackPanel>
|
29 | 30 | </DataTemplate>
|
30 | 31 |
|
31 | 32 | <DataTemplate DataType="m:Branch">
|
32 | 33 | <StackPanel Orientation="Horizontal">
|
33 | 34 | <Path Width="14" Height="14" Data="{StaticResource Icons.Branch}"/>
|
34 |
| - <SelectableTextBlock VerticalAlignment="Center" Text="{Binding FriendlyName}" Margin="8,0,0,0"/> |
| 35 | + <SelectableTextBlock VerticalAlignment="Center" Text="{Binding FriendlyName}" Margin="8,0,0,0" IsTabStop="False"/> |
35 | 36 | </StackPanel>
|
36 | 37 | </DataTemplate>
|
37 | 38 |
|
|
53 | 54 | </ContentControl>
|
54 | 55 | </Grid>
|
55 | 56 |
|
56 |
| - <ListBox IsVisible="{Binding ControlParameters, Converter={x:Static c:ListConverters.IsNotNullOrEmpty}}" |
57 |
| - ItemsSource="{Binding ControlParameters, Mode=OneWay}"> |
58 |
| - <ListBox.Styles> |
59 |
| - <Style Selector="ListBoxItem"> |
60 |
| - <Setter Property="Height" Value="32"/> |
61 |
| - <Setter Property="Margin" Value="0"/> |
62 |
| - <Setter Property="Padding" Value="0"/> |
63 |
| - <Setter Property="BorderThickness" Value="0"/> |
| 57 | + <ItemsControl IsVisible="{Binding ControlParameters, Converter={x:Static c:ListConverters.IsNotNullOrEmpty}}" |
| 58 | + ItemsSource="{Binding ControlParameters, Mode=OneWay}"> |
| 59 | + <ItemsControl.Styles> |
| 60 | + <Style Selector="ContentPresenter"> |
| 61 | + <Setter Property="Margin" Value="0,1,0,1"/> |
64 | 62 | </Style>
|
65 |
| - <Style Selector="ListBoxItem:pointerover /template/ ContentPresenter#PART_ContentPresenter, ListBoxItem:selected /template/ ContentPresenter#PART_ContentPresenter"> |
66 |
| - <Setter Property="Background" Value="Transparent"/> |
67 |
| - </Style> |
68 |
| - </ListBox.Styles> |
| 63 | + </ItemsControl.Styles> |
69 | 64 |
|
70 |
| - <ListBox.ItemsPanel> |
| 65 | + <ItemsControl.ItemsPanel> |
71 | 66 | <ItemsPanelTemplate>
|
72 | 67 | <StackPanel Orientation="Vertical"/>
|
73 | 68 | </ItemsPanelTemplate>
|
74 |
| - </ListBox.ItemsPanel> |
75 |
| - |
76 |
| - <ListBox.DataTemplates> |
| 69 | + </ItemsControl.ItemsPanel> |
| 70 | + |
| 71 | + <ItemsControl.DataTemplates> |
77 | 72 | <DataTemplate DataType="vm:CustomActionControlTextBox">
|
78 | 73 | <Grid ColumnDefinitions="150,*">
|
79 | 74 | <TextBlock Grid.Column="0"
|
80 | 75 | Text="{Binding Label}"
|
81 | 76 | HorizontalAlignment="Right" VerticalAlignment="Center"
|
82 | 77 | Margin="0,0,8,0"/>
|
83 |
| - |
84 | 78 | <TextBox Grid.Column="1"
|
85 | 79 | Height="28"
|
86 | 80 | VerticalAlignment="Center"
|
|
105 | 99 | Text="{Binding Label}"
|
106 | 100 | HorizontalAlignment="Right" VerticalAlignment="Center"
|
107 | 101 | Margin="0,0,8,0"/>
|
108 |
| - |
109 | 102 | <TextBox Grid.Column="1"
|
110 | 103 | Height="28"
|
111 | 104 | CornerRadius="3"
|
|
119 | 112 | </TextBox>
|
120 | 113 | </Grid>
|
121 | 114 | </DataTemplate>
|
122 |
| - </ListBox.DataTemplates> |
123 |
| - </ListBox> |
| 115 | + </ItemsControl.DataTemplates> |
| 116 | + </ItemsControl> |
124 | 117 | </StackPanel>
|
125 | 118 | </UserControl>
|
0 commit comments