|
25 | 25 | <Setter Property="Validation.ErrorTemplate">
|
26 | 26 | <Setter.Value>
|
27 | 27 | <ControlTemplate x:Name="TextBoxErrorTemplate">
|
28 |
| - <StackPanel HorizontalAlignment="Stretch" Orientation="Horizontal"> |
29 |
| - <AdornedElementPlaceholder/> |
| 28 | + <Grid> |
| 29 | + <AdornedElementPlaceholder Grid.Row="0"/> |
30 | 30 | <Image Source="{StaticResource InvalidTextImage}"
|
31 | 31 | Height="16"
|
32 | 32 | Margin="0,-8,-8,0"
|
33 | 33 | HorizontalAlignment="Right"
|
34 | 34 | VerticalAlignment="Top"/>
|
35 |
| - </StackPanel> |
| 35 | + </Grid> |
36 | 36 | </ControlTemplate>
|
37 | 37 | </Setter.Value>
|
38 | 38 | </Setter>
|
|
55 | 55 | <TextBlock Text="{Binding ArgumentType, Converter={StaticResource AnnotationArgumentTypeToStringConverter}}"/>
|
56 | 56 | </DataTemplate>
|
57 | 57 | <DataTemplate DataType="{x:Type local:IAnnotationArgumentViewModel}" x:Key="ArgumentMultiTypeTemplate">
|
58 |
| - <ComboBox |
59 |
| - ItemsSource="{Binding Path=ApplicableArgumentTypes}" |
60 |
| - SelectedItem="{Binding Path=ArgumentType, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" |
61 |
| - IsSynchronizedWithCurrentItem="True"> |
| 58 | + <ComboBox ItemsSource="{Binding Path=ApplicableArgumentTypes}" |
| 59 | + SelectedItem="{Binding Path=ArgumentType, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" |
| 60 | + IsSynchronizedWithCurrentItem="True"> |
62 | 61 | <ComboBox.ItemTemplate>
|
63 | 62 | <DataTemplate DataType="{x:Type annotations:AnnotationArgumentType}">
|
64 | 63 | <TextBlock Text="{Binding Path=., Converter={StaticResource AnnotationArgumentTypeToStringConverter}}"/>
|
|
77 | 76 | <DataTemplate.Resources>
|
78 | 77 | <CollectionViewSource Source="{Binding InspectionNames}" x:Key="InspectionNamesView" />
|
79 | 78 | </DataTemplate.Resources>
|
80 |
| - <StackPanel> |
| 79 | + <StackPanel VerticalAlignment="Center"> |
81 | 80 | <TextBox Text="{Binding ArgumentValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, ValidatesOnNotifyDataErrors=True}"
|
82 | 81 | Style="{StaticResource TextBoxErrorStyle}"
|
| 82 | + HorizontalAlignment="Stretch" |
| 83 | + VerticalAlignment="Stretch" |
83 | 84 | Visibility="{Binding ArgumentType, Converter={StaticResource DefaultArgumentVisibilityConverter}}">
|
84 | 85 | </TextBox>
|
85 |
| - <ComboBox |
86 |
| - Visibility="{Binding ArgumentType, Converter={StaticResource BooleanArgumentVisibilityConverter}}" |
87 |
| - ItemsSource="{Binding Path=BooleanValues}" |
88 |
| - SelectedItem="{Binding Path=ArgumentValue, UpdateSourceTrigger=PropertyChanged, ValidatesOnNotifyDataErrors=True}"> |
| 86 | + <ComboBox Visibility="{Binding ArgumentType, Converter={StaticResource BooleanArgumentVisibilityConverter}}" |
| 87 | + ItemsSource="{Binding Path=BooleanValues}" |
| 88 | + SelectedItem="{Binding Path=ArgumentValue, UpdateSourceTrigger=PropertyChanged, ValidatesOnNotifyDataErrors=True}" |
| 89 | + HorizontalAlignment="Stretch" |
| 90 | + VerticalAlignment="Stretch"> |
89 | 91 | </ComboBox>
|
90 |
| - <ComboBox |
91 |
| - Visibility="{Binding ArgumentType, Converter={StaticResource InspectionArgumentVisibilityConverter}}" |
92 |
| - ItemsSource="{Binding Path=InspectionNames}" |
93 |
| - SelectedItem="{Binding Path=ArgumentValue, UpdateSourceTrigger=PropertyChanged, ValidatesOnNotifyDataErrors=True}"> |
| 92 | + <ComboBox Visibility="{Binding ArgumentType, Converter={StaticResource InspectionArgumentVisibilityConverter}}" |
| 93 | + ItemsSource="{Binding Path=InspectionNames}" |
| 94 | + SelectedItem="{Binding Path=ArgumentValue, UpdateSourceTrigger=PropertyChanged, ValidatesOnNotifyDataErrors=True}"> |
94 | 95 | <ComboBox.ItemTemplate>
|
95 | 96 | <DataTemplate>
|
96 |
| - <TextBlock Text="{Binding Path=., Converter={StaticResource InspectionToLocalizedNameConverter}, UpdateSourceTrigger=PropertyChanged}"/> |
| 97 | + <TextBlock Text="{Binding Path=., Converter={StaticResource InspectionToLocalizedNameConverter}, UpdateSourceTrigger=PropertyChanged}" |
| 98 | + HorizontalAlignment="Stretch" |
| 99 | + VerticalAlignment="Stretch"/> |
97 | 100 | </DataTemplate>
|
98 | 101 | </ComboBox.ItemTemplate>
|
99 | 102 | </ComboBox>
|
|
116 | 119 | <Label Content="{Resx ResxName=Rubberduck.Resources.RubberduckUI, Key=AnnotateDeclarationDialog_DeclarationLabel}" FontWeight="DemiBold" />
|
117 | 120 | <TextBlock Text="{Binding Model.Target, Converter={StaticResource DeclarationToQualifiedNameConverter}}" Margin="5,0,0,5" FontWeight="Regular" />
|
118 | 121 | <Label Content="{Resx ResxName=Rubberduck.Resources.RubberduckUI, Key=AnnotateDeclarationDialog_AnnotationLabel}" FontWeight="DemiBold" />
|
119 |
| - <ComboBox |
120 |
| - ItemsSource="{Binding ApplicableAnnotations}" |
121 |
| - SelectedItem="{Binding Annotation}" |
122 |
| - IsSynchronizedWithCurrentItem="True" |
123 |
| - Margin="5,0,5,5"> |
| 122 | + <ComboBox ItemsSource="{Binding ApplicableAnnotations}" |
| 123 | + SelectedItem="{Binding Annotation}" |
| 124 | + IsSynchronizedWithCurrentItem="True" |
| 125 | + Margin="5,0,5,5"> |
124 | 126 | <ComboBox.ItemTemplate>
|
125 | 127 | <DataTemplate DataType="{x:Type annotations:IAnnotation}">
|
126 | 128 | <TextBlock Text="{Binding Path=., Converter={StaticResource AnnotationToCodeStringConverter}}"/>
|
|
133 | 135 | <ColumnDefinition Width="*" />
|
134 | 136 | <ColumnDefinition Width="auto" />
|
135 | 137 | </Grid.ColumnDefinitions>
|
136 |
| - <Label |
137 |
| - Grid.Column="0" |
138 |
| - Content="{Resx ResxName=Rubberduck.Resources.RubberduckUI, Key=AnnotateDeclarationDialog_ArgumentsLabel}" |
139 |
| - FontWeight="DemiBold" |
140 |
| - Margin="5,5,0,0" /> |
141 |
| - <StackPanel |
142 |
| - Grid.Column="1" |
143 |
| - Orientation="Horizontal"> |
| 138 | + <Label Grid.Column="0" |
| 139 | + Content="{Resx ResxName=Rubberduck.Resources.RubberduckUI, Key=AnnotateDeclarationDialog_ArgumentsLabel}" |
| 140 | + FontWeight="DemiBold" |
| 141 | + Margin="5,5,0,0" /> |
| 142 | + <StackPanel Grid.Column="1" |
| 143 | + Orientation="Horizontal"> |
144 | 144 | <Button Content="{Resx ResxName=Rubberduck.Resources.RubberduckUI, Key=AnnotateDeclarationDialog_AddArgumentButtonLabel}"
|
145 | 145 | Height="20"
|
146 | 146 | Margin="5,2.5"
|
|
153 | 153 | Command="{Binding RemoveAnnotationArgument}"/>
|
154 | 154 | </StackPanel>
|
155 | 155 | </Grid>
|
156 |
| - <DataGrid |
157 |
| - Grid.Row="3" |
158 |
| - VerticalAlignment="Stretch" |
159 |
| - ItemsSource="{Binding Path=AnnotationArguments}" |
160 |
| - AutoGenerateColumns="False" |
161 |
| - VerticalScrollBarVisibility="Auto" |
162 |
| - Margin="5,0,0,5"> |
| 156 | + <DataGrid Grid.Row="3" |
| 157 | + VerticalAlignment="Stretch" |
| 158 | + ItemsSource="{Binding Path=AnnotationArguments}" |
| 159 | + AutoGenerateColumns="False" |
| 160 | + VerticalScrollBarVisibility="Auto" |
| 161 | + Margin="5,0,0,5"> |
163 | 162 | <DataGrid.Columns>
|
164 |
| - <DataGridTemplateColumn |
165 |
| - Header="{Resx ResxName=Rubberduck.Resources.RubberduckUI, Key=AnnotateDeclarationDialog_ArgumentTypeHeader}" |
166 |
| - CellTemplateSelector="{StaticResource AnnotationArgumentTypeCellDataTemplateSelector}" |
167 |
| - CellEditingTemplateSelector="{StaticResource AnnotationArgumentTypeCellDataTemplateSelector}" |
168 |
| - Width="Auto"/> |
169 |
| - <DataGridTemplateColumn |
170 |
| - Header="{Resx ResxName=Rubberduck.Resources.RubberduckUI, Key=AnnotateDeclarationDialog_ArgumentValueHeader}" |
171 |
| - CellTemplate="{StaticResource ArgumentValueTemplate}" |
172 |
| - CellEditingTemplate="{StaticResource ArgumentValueTemplate}" |
173 |
| - Width="*"/> |
| 163 | + <DataGridTemplateColumn Header="{Resx ResxName=Rubberduck.Resources.RubberduckUI, Key=AnnotateDeclarationDialog_ArgumentTypeHeader}" |
| 164 | + CellTemplateSelector="{StaticResource AnnotationArgumentTypeCellDataTemplateSelector}" |
| 165 | + CellEditingTemplateSelector="{StaticResource AnnotationArgumentTypeCellDataTemplateSelector}" |
| 166 | + Width="Auto"/> |
| 167 | + <DataGridTemplateColumn Header="{Resx ResxName=Rubberduck.Resources.RubberduckUI, Key=AnnotateDeclarationDialog_ArgumentValueHeader}" |
| 168 | + CellTemplate="{StaticResource ArgumentValueTemplate}" |
| 169 | + CellEditingTemplate="{StaticResource ArgumentValueTemplate}" |
| 170 | + Width="*"/> |
174 | 171 | </DataGrid.Columns>
|
175 | 172 | </DataGrid>
|
176 | 173 | <Grid Grid.Row="4" Background="{x:Static SystemColors.ControlDarkBrush}" Grid.IsSharedSizeScope="True">
|
|
0 commit comments