Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit 85c7584

Browse files
committed
Use LinkDropDown for all the things.
1 parent 1e11c62 commit 85c7584

File tree

1 file changed

+5
-127
lines changed

1 file changed

+5
-127
lines changed

src/GitHub.VisualStudio/UI/Views/PullRequestListView.xaml

Lines changed: 5 additions & 127 deletions
Original file line numberDiff line numberDiff line change
@@ -101,142 +101,20 @@
101101

102102
<WrapPanel Grid.Column="0" HorizontalAlignment="Stretch">
103103

104-
<ui:GitHubActionLink x:Name="stateSelection"
105-
Margin="5,0"
106-
VerticalAlignment="Center"
107-
ToolTip="Filter by state"
108-
Content="{Binding SelectedState}"
109-
HasDropDown="True">
110-
<i:Interaction.Triggers>
111-
<i:EventTrigger EventName="Click">
112-
<ui:OpenPopupAction TargetName="statePopup" />
113-
</i:EventTrigger>
114-
</i:Interaction.Triggers>
115-
</ui:GitHubActionLink>
116-
117-
<Popup x:Name="statePopup"
118-
AllowsTransparency="True"
119-
Placement="Bottom"
120-
PlacementTarget="{Binding ElementName=stateSelection}"
121-
StaysOpen="False">
122-
<Border Style="{DynamicResource GitHubComboBoxBorder}">
123-
<DockPanel Width="100" Style="{DynamicResource GitHubComboBoxDockPanelContainer}">
124-
<ListBox x:Name="states"
125-
DockPanel.Dock="Top"
126-
ItemsSource="{Binding States}"
127-
SelectedItem="{Binding SelectedState}"
128-
Style="{DynamicResource GitHubPopupThing}">
129-
<i:Interaction.Triggers>
130-
<i:EventTrigger EventName="SelectionChanged">
131-
<ui:ClosePopupAction TargetName="statePopup" />
132-
</i:EventTrigger>
133-
</i:Interaction.Triggers>
134-
</ListBox>
135-
</DockPanel>
136-
</Border>
137-
</Popup>
104+
<ui:LinkDropDown ItemsSource="{Binding States}"
105+
SelectedItem="{Binding SelectedState}"/>
138106

139107
<Separator Style="{StaticResource VerticalSeparator}" />
140108

141109
<ui:LinkDropDown Header="Assignee"
142110
ItemsSource="{Binding Assignees}"
143111
SelectedItem="{Binding SelectedAssignee}"/>
144112

145-
<!--<ui:GitHubActionLink x:Name="assigneeSelection"
146-
Margin="5,0"
147-
VerticalAlignment="Center"
148-
ToolTip="Filter by assignee"
149-
Content="{Binding SelectedAssignee,
150-
Converter={ui:DefaultValueConverter},
151-
ConverterParameter=Assignee}"
152-
HasDropDown="True">
153-
<i:Interaction.Triggers>
154-
<i:EventTrigger EventName="Click">
155-
<ui:OpenPopupAction TargetName="assigneePopup" />
156-
</i:EventTrigger>
157-
</i:Interaction.Triggers>
158-
</ui:GitHubActionLink>
159-
160-
<Popup x:Name="assigneePopup"
161-
AllowsTransparency="True"
162-
Placement="Bottom"
163-
PlacementTarget="{Binding ElementName=assigneeSelection}"
164-
StaysOpen="False">
165-
<Border Style="{DynamicResource GitHubComboBoxBorder}">
166-
<DockPanel Width="100" Style="{DynamicResource GitHubComboBoxDockPanelContainer}">
167-
168-
<ListBox x:Name="assignees"
169-
DockPanel.Dock="Top"
170-
SelectedItem="{Binding SelectedAssignee}"
171-
Style="{DynamicResource GitHubPopupThing}">
172-
<ListBox.ItemsSource>
173-
<MultiBinding Converter="{ui:StickieListItemConverter}">
174-
<Binding Path="EmptyUser" />
175-
<Binding Path="Assignees" />
176-
</MultiBinding>
177-
</ListBox.ItemsSource>
178-
<i:Interaction.Behaviors>
179-
<ui:AddEmptyItemToList />
180-
</i:Interaction.Behaviors>
181-
<i:Interaction.Triggers>
182-
<i:EventTrigger EventName="SelectionChanged">
183-
<ui:ClosePopupAction TargetName="assigneePopup" />
184-
</i:EventTrigger>
185-
</i:Interaction.Triggers>
186-
</ListBox>
187-
</DockPanel>
188-
</Border>
189-
</Popup>-->
190-
191113
<Separator Style="{StaticResource VerticalSeparator}" />
192114

193-
<ui:GitHubActionLink x:Name="authorSelection"
194-
Margin="5,0"
195-
VerticalAlignment="Center"
196-
ToolTip="Filter by author"
197-
Content="{Binding SelectedAuthor,
198-
Converter={ui:DefaultValueConverter},
199-
ConverterParameter=Author}"
200-
HasDropDown="True">
201-
<i:Interaction.Triggers>
202-
<i:EventTrigger EventName="Click">
203-
<ui:OpenPopupAction TargetName="authorPopup" />
204-
</i:EventTrigger>
205-
</i:Interaction.Triggers>
206-
207-
</ui:GitHubActionLink>
208-
209-
<Popup x:Name="authorPopup"
210-
AllowsTransparency="True"
211-
Placement="Bottom"
212-
PlacementTarget="{Binding ElementName=authorSelection}"
213-
StaysOpen="False">
214-
<Border Style="{DynamicResource GitHubComboBoxBorder}">
215-
<DockPanel Width="100" Style="{DynamicResource GitHubComboBoxDockPanelContainer}">
216-
217-
<ListBox x:Name="authors"
218-
DockPanel.Dock="Top"
219-
SelectedItem="{Binding SelectedAuthor}"
220-
Style="{DynamicResource GitHubPopupThing}">
221-
<ListBox.ItemsSource>
222-
<MultiBinding Converter="{ui:StickieListItemConverter}">
223-
<Binding Path="EmptyUser" />
224-
<Binding Path="Authors" />
225-
</MultiBinding>
226-
</ListBox.ItemsSource>
227-
<i:Interaction.Behaviors>
228-
<ui:AddEmptyItemToList />
229-
</i:Interaction.Behaviors>
230-
<i:Interaction.Triggers>
231-
<i:EventTrigger EventName="SelectionChanged">
232-
<ui:ClosePopupAction TargetName="authorPopup" />
233-
</i:EventTrigger>
234-
</i:Interaction.Triggers>
235-
</ListBox>
236-
</DockPanel>
237-
</Border>
238-
</Popup>
239-
115+
<ui:LinkDropDown Header="Author"
116+
ItemsSource="{Binding Authors}"
117+
SelectedItem="{Binding SelectedAuthor}"/>
240118
</WrapPanel>
241119

242120
<ui:GitHubActionLink Grid.Column="1"

0 commit comments

Comments
 (0)