|
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:scm="clr-namespace:System.ComponentModel;assembly=WindowsBase" |
6 | 7 | xmlns:converters="clr-namespace:Rubberduck.UI.Converters"
|
7 | 8 | xmlns:local="clr-namespace:Rubberduck.UI.Refactorings.AnnotateDeclaration"
|
8 | 9 | xmlns:annotations="clr-namespace:Rubberduck.Parsing.Annotations;assembly=Rubberduck.Parsing"
|
9 | 10 | mc:Ignorable="d"
|
10 |
| - d:DesignHeight="400" d:DesignWidth="300"> |
| 11 | + d:DesignHeight="500" d:DesignWidth="400"> |
11 | 12 | <UserControl.Resources>
|
12 | 13 | <ResourceDictionary>
|
13 | 14 | <ResourceDictionary.MergedDictionaries>
|
|
24 | 25 | <Setter Property="Validation.ErrorTemplate">
|
25 | 26 | <Setter.Value>
|
26 | 27 | <ControlTemplate x:Name="TextBoxErrorTemplate">
|
27 |
| - <Canvas> |
28 |
| - <DockPanel LastChildFill="True" ClipToBounds="False"> |
29 |
| - <AdornedElementPlaceholder/> |
30 |
| - <Image Source="{StaticResource InvalidTextImage}" |
31 |
| - Height="16" |
32 |
| - Margin="0,-8,-8,0" |
33 |
| - HorizontalAlignment="Right" |
34 |
| - VerticalAlignment="Top" |
35 |
| - ClipToBounds="False"/> |
36 |
| - </DockPanel> |
37 |
| - </Canvas> |
| 28 | + <StackPanel HorizontalAlignment="Stretch" Orientation="Horizontal"> |
| 29 | + <AdornedElementPlaceholder/> |
| 30 | + <Image Source="{StaticResource InvalidTextImage}" |
| 31 | + Height="16" |
| 32 | + Margin="0,-8,-8,0" |
| 33 | + HorizontalAlignment="Right" |
| 34 | + VerticalAlignment="Top"/> |
| 35 | + </StackPanel> |
38 | 36 | </ControlTemplate>
|
39 | 37 | </Setter.Value>
|
40 | 38 | </Setter>
|
|
53 | 51 |
|
54 | 52 | <Grid>
|
55 | 53 | <Grid.RowDefinitions>
|
56 |
| - <RowDefinition Height="auto" /> |
57 |
| - <RowDefinition Height="auto" /> |
| 54 | + <RowDefinition Height="Auto" /> |
| 55 | + <RowDefinition Height="Auto" /> |
58 | 56 | <RowDefinition Height="*" />
|
59 | 57 | <RowDefinition Height="40" />
|
60 | 58 | </Grid.RowDefinitions>
|
61 | 59 | <StackPanel Background="{StaticResource BackgroundLightBrush}">
|
62 |
| - <Label Content="{Resx ResxName=Rubberduck.Resources.RubberduckUI, Key=AnnotateDeclarationDialog_TitleText}" FontWeight="Bold" /> |
63 |
| - <TextBlock Text="{Resx ResxName=Rubberduck.Resources.RubberduckUI, Key=AnnotateDeclarationDialog_Instructions}" Margin="5,0" TextWrapping="Wrap" /> |
| 60 | + <Label Content="{Resx ResxName=Rubberduck.Resources.RubberduckUI, Key=AnnotateDeclarationDialog_TitleText}" FontWeight="Bold"/> |
| 61 | + <TextBlock Text="{Resx ResxName=Rubberduck.Resources.RubberduckUI, Key=AnnotateDeclarationDialog_Instructions}" Margin="5,0,0,10" TextWrapping="Wrap" /> |
64 | 62 | </StackPanel>
|
65 | 63 | <StackPanel Grid.Row="1">
|
66 |
| - <TextBlock Text="{Resx ResxName=Rubberduck.Resources.RubberduckUI, Key=AnnotateDeclarationDialog_DeclarationLabel}" Margin="5,0" /> |
67 |
| - <TextBlock Text="{Binding Model.Target, Converter={StaticResource DeclarationToQualifiedNameConverter}}" Margin="10,0" /> |
68 |
| - <TextBlock Text="{Resx ResxName=Rubberduck.Resources.RubberduckUI, Key=AnnotateDeclarationDialog_AnnotationLabel}" Margin="5,5,0,0" /> |
| 64 | + <Label Content="{Resx ResxName=Rubberduck.Resources.RubberduckUI, Key=AnnotateDeclarationDialog_DeclarationLabel}" FontWeight="DemiBold" /> |
| 65 | + <TextBlock Text="{Binding Model.Target, Converter={StaticResource DeclarationToQualifiedNameConverter}}" Margin="5,0,0,5" FontWeight="Regular" /> |
| 66 | + <Label Content="{Resx ResxName=Rubberduck.Resources.RubberduckUI, Key=AnnotateDeclarationDialog_AnnotationLabel}" FontWeight="DemiBold" /> |
69 | 67 | <ComboBox
|
70 | 68 | ItemsSource="{Binding ApplicableAnnotations}"
|
71 | 69 | SelectedItem="{Binding Annotation}"
|
|
77 | 75 | </DataTemplate>
|
78 | 76 | </ComboBox.ItemTemplate>
|
79 | 77 | </ComboBox>
|
80 |
| - <TextBlock Text="{Resx ResxName=Rubberduck.Resources.RubberduckUI, Key=AnnotateDeclarationDialog_ArgumentsLabel}" Margin="5,5,0,0" /> |
| 78 | + <Label Content="{Resx ResxName=Rubberduck.Resources.RubberduckUI, Key=AnnotateDeclarationDialog_ArgumentsLabel}" FontWeight="DemiBold" Margin="5,5,0,0" /> |
81 | 79 | </StackPanel>
|
82 | 80 | <Grid Grid.Row="2">
|
83 | 81 | <Grid.ColumnDefinitions>
|
|
108 | 106 | <converters:SpecificValueToVisibilityConverter SpecialValue="{x:Static annotations:AnnotationArgumentType.Boolean}" CollapseSpecialValue="False" x:Key="BooleanArgumentVisibilityConverter"/>
|
109 | 107 | <converters:SpecificValueToVisibilityConverter SpecialValue="{x:Static annotations:AnnotationArgumentType.Inspection}" CollapseSpecialValue="False" x:Key="InspectionArgumentVisibilityConverter"/>
|
110 | 108 | <DataTemplate DataType="{x:Type local:IAnnotationArgumentViewModel}" x:Key="ArgumentValueTemplate">
|
| 109 | + <DataTemplate.Resources> |
| 110 | + <CollectionViewSource Source="{Binding InspectionNames}" x:Key="InspectionNamesView"> |
| 111 | + <CollectionViewSource.SortDescriptions> |
| 112 | + <scm:SortDescription PropertyName="." /> <!-- This is not really the sort we want. We want a converter here, which is impossible. --> |
| 113 | + </CollectionViewSource.SortDescriptions> |
| 114 | + </CollectionViewSource> |
| 115 | + </DataTemplate.Resources> |
111 | 116 | <StackPanel>
|
112 | 117 | <TextBox Text="{Binding ArgumentValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, ValidatesOnNotifyDataErrors=True}"
|
113 | 118 | Style="{StaticResource TextBoxErrorStyle}"
|
|
0 commit comments