ExtractInterfaceDialog.xaml 10.3 KB
Newer Older
1 2 3 4
<vs:DialogWindow x:Uid="ExtractInterfaceDialog"
             x:Class="Microsoft.VisualStudio.LanguageServices.Implementation.ExtractInterface.ExtractInterfaceDialog"
             x:ClassModifier="internal"
             x:Name="dialog"
J
Jared Parsons 已提交
5
             xmlns:vs="clr-namespace:Microsoft.VisualStudio.PlatformUI;assembly=Microsoft.VisualStudio.Shell.15.0"
6 7 8 9
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
J
Jared Parsons 已提交
10
             xmlns:s="clr-namespace:Microsoft.VisualStudio.PlatformUI;assembly=Microsoft.VisualStudio.Shell.15.0"
D
David Poeschl 已提交
11
             xmlns:u="clr-namespace:Microsoft.VisualStudio.LanguageServices.Implementation.Utilities"
12 13 14 15 16 17 18 19 20
             mc:Ignorable="d" 
             d:DesignHeight="380" d:DesignWidth="460"
             Height="380" Width="460"
             MinHeight="380" MinWidth="460"
             Title="{Binding ElementName=dialog, Path=ExtractInterfaceDialogTitle}"
             HasHelpButton="True"
             FocusManager.FocusedElement="{Binding ElementName=interfaceNameTextBox}"
             ResizeMode="CanResizeWithGrip"
             ShowInTaskbar="False"
D
dpoeschl 已提交
21
             HasDialogFrame="True"
22 23 24 25 26 27 28 29 30 31
             WindowStartupLocation="CenterOwner">
    <Window.Resources>
        <Style TargetType="ListBoxItem">
            <Setter Property="IsTabStop" 
                    Value="False" />
        </Style>
        <Thickness x:Key="labelPadding">0, 5, 0, 2</Thickness>
        <Thickness x:Key="okCancelButtonPadding">9,2,9,2</Thickness>
        <Thickness x:Key="selectDeselectButtonPadding">9,2,9,2</Thickness>
        <Thickness x:Key="textboxPadding">2</Thickness>
A
Andrew Hall (METAL) 已提交
32
        <Thickness x:Key="radioButtonPadding">2, 0, 2, 0</Thickness>
33 34 35 36 37 38 39 40 41
    </Window.Resources>
    <Grid Margin="11,6,11,11">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <StackPanel Grid.Row="0">
            <Label x:Uid="InterfaceNameLabel" 
D
David Poeschl 已提交
42
                   x:Name="InterfaceNameLabel"
43 44 45
                   Content="{Binding ElementName=dialog, Path=NewInterfaceName}"
                   Padding="{StaticResource ResourceKey=labelPadding}"
                   Target="{Binding ElementName=interfaceNameTextBox}"/>
D
David Poeschl 已提交
46 47
            <TextBox x:Uid="InterfaceNameTextBox"
                     AutomationProperties.LabeledBy="{Binding ElementName=InterfaceNameLabel}"
48 49 50 51 52
                     Text="{Binding InterfaceName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" 
                     Name="interfaceNameTextBox"
                     Padding="{StaticResource ResourceKey=textboxPadding}"
                     GotFocus="SelectAllInTextBox"/>
            <Label x:Uid="GeneratedNameLabel" 
D
David Poeschl 已提交
53
                   x:Name="GeneratedNameLabel" 
54 55 56
                   Content="{Binding ElementName=dialog, Path=GeneratedName}" 
                   Padding="{StaticResource ResourceKey=labelPadding}"/>
            <TextBox x:Uid="GeneratedNameTextBox" 
D
David Poeschl 已提交
57
                     AutomationProperties.LabeledBy="{Binding ElementName=GeneratedNameLabel}"
58 59 60 61 62
                     Text="{Binding GeneratedName, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}" 
                     IsReadOnly="True"
                     Background="{DynamicResource {x:Static SystemColors.ControlBrush}}"
                     Padding="{StaticResource ResourceKey=textboxPadding}"
                     GotFocus="SelectAllInTextBox"/>
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82

            <GroupBox x:Uid="DestinationSelectionGroupBox"
                      Margin="0, 9, 0, 0"
                      Header="{Binding ElementName=dialog, Path=SelectDestinationFile}">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition />
                    </Grid.ColumnDefinitions>

                    <RadioButton x:Uid="DestinationCurrentFileSelectionRadioButton"
                                 GroupName="FileDestination"
                                 Tag="CurrentFileDestinationTag"
                                 Grid.Row="0"
                                 Grid.ColumnSpan="2" 
                                 Content="{Binding ElementName=dialog, Path=SelectCurrentFileAsDestination}"
A
Andrew Hall (METAL) 已提交
83
                                 Padding="{StaticResource ResourceKey=radioButtonPadding}"
84
                                 Checked="DestinationFile_Checked"
A
Andrew Hall (METAL) 已提交
85
                                 VerticalAlignment="Center"
86 87 88 89 90 91 92 93 94 95
                                 />

                    <RadioButton x:Uid="DestinationNewFileSelectionRadioButton"
                                 GroupName="FileDestination"
                                 Tag="NewFileDestinationTag"
                                 Grid.Row="1"
                                 Grid.Column="0"
                                 Content="{Binding ElementName=dialog, Path=SelectNewFileAsDestination}"
                                 IsChecked="True"
                                 Checked="DestinationFile_Checked"
A
Andrew Hall (METAL) 已提交
96 97
                                 Padding="{StaticResource ResourceKey=radioButtonPadding}"
                                 VerticalAlignment="Center"
98 99 100
                                 />

                    <TextBox x:Uid="FileNameTextBox" 
A
Andrew Hall (METAL) 已提交
101
                             AutomationProperties.LabeledBy="{Binding ElementName=DestinationNewFileSelectionRadioButton}"
102 103 104 105 106 107 108 109 110
                             Text="{Binding FileName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" 
                             Padding="{StaticResource ResourceKey=textboxPadding}"
                             Name="fileNameTextBox"
                             IsEnabled="{Binding FileNameEnabled, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"
                             GotFocus="SelectAllInTextBox"
                             Grid.Column="1" 
                             Grid.Row="1" />
                </Grid>
            </GroupBox>
111 112 113 114 115 116 117 118 119 120
        </StackPanel>
        <GroupBox x:Uid="MemberSelectionGroupBox"
                  Margin="0, 9, 0, 0"
                  Grid.Row="1"
                  Header="{Binding ElementName=dialog, Path=SelectPublicMembersToFormInterface}">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
D
David Poeschl 已提交
121
                <u:AutomationDelegatingListView x:Uid="MemberSelectionList"
122 123 124 125 126 127 128
                          x:Name="Members"
                          Grid.Column="0"
                          Margin="9"
                          SelectionMode="Extended"
                          PreviewKeyDown="OnListViewPreviewKeyDown"
                          MouseDoubleClick="OnListViewDoubleClick"
                          ItemsSource="{Binding MemberContainers, Mode=TwoWay}">
D
David Poeschl 已提交
129
                    <u:AutomationDelegatingListView.ItemTemplate x:Uid="SelectableMemberListItem">
130 131
                        <DataTemplate>
                            <StackPanel Orientation="Horizontal">
D
David Poeschl 已提交
132 133
                                <CheckBox x:Uid="SelectableMemberCheckBox"
                                          AutomationProperties.Name="{Binding MemberAutomationText}"
134 135 136 137 138 139 140 141 142 143 144 145
                                          IsChecked="{Binding IsChecked, Mode=TwoWay}" 
                                          Width="Auto"
                                          Focusable="False"
                                          AutomationProperties.AutomationId="{Binding MemberName}">
                                </CheckBox>
                                <Image x:Uid="SelectableMemberGlyph" 
                                       Margin="8,0,0,0"
                                               Source="{Binding Glyph}"/>
                                <TextBlock x:Uid="SelectableMemberName" 
                                                   Text="{Binding MemberName}"/>
                            </StackPanel>
                        </DataTemplate>
D
David Poeschl 已提交
146 147
                    </u:AutomationDelegatingListView.ItemTemplate>
                </u:AutomationDelegatingListView>
148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187
                <StackPanel Grid.Column="1">
                    <Button x:Uid="SelectAllButton"
                            Content="{Binding ElementName=dialog, Path=SelectAll}" 
                            Margin="2, 9, 9, 7" 
                            Click="Select_All_Click" 
                            Padding="{StaticResource ResourceKey=selectDeselectButtonPadding}"
                            MinWidth="73"
                            MinHeight="21"/>
                    <Button x:Uid="DeselectAllButton"
                            Content="{Binding ElementName=dialog, Path=DeselectAll}" 
                            Margin="2, 0, 9, 0"
                            Padding="{StaticResource ResourceKey=selectDeselectButtonPadding}"
                            Click="Deselect_All_Click" 
                            MinWidth="73"
                            MinHeight="21"/>
                </StackPanel>
            </Grid>
        </GroupBox>
        <StackPanel Grid.Row="2" 
                    HorizontalAlignment="Right" 
                    Margin="0, 11, 0, 0"
                    Orientation="Horizontal">
            <Button x:Uid="OkButton" 
                    Content="{Binding ElementName=dialog, Path=OK}" 
                    Margin="0, 0, 0, 0" 
                    Padding="{StaticResource ResourceKey=okCancelButtonPadding}"
                    Click="OK_Click" 
                    IsDefault="True"
                    MinWidth="73"
                    MinHeight="21"/>
            <Button x:Uid="CancelButton" 
                    Content="{Binding ElementName=dialog, Path=Cancel}"
                    Margin="7, 0, 0, 0" 
                    Padding="{StaticResource ResourceKey=okCancelButtonPadding}"
                    Click="Cancel_Click"
                    IsCancel="True"
                    MinWidth="73"
                    MinHeight="21"/>
        </StackPanel>
    </Grid>
J
Jared Parsons 已提交
188
</vs:DialogWindow>