This repository was archived by the owner on Jun 21, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +12
-8
lines changed
GitHub.VisualStudio/UI/Views Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -33,14 +33,13 @@ protected override void OnAttached()
3333 return ;
3434 defaultValue = PropertyPathHelper . GetValue ( binding . ResolvedSource , binding . ResolvedSourcePropertyName ) ;
3535 }
36- dynamic items = AssociatedObject . ItemsSource ;
37- var list = items as IList ;
36+ var list = AssociatedObject . ItemsSource as IList ;
3837 Debug . Assert ( list != null , "ItemsSource data source is not an IList, cannot change it." ) ;
3938 if ( list == null )
4039 return ;
4140 try
4241 {
43- items . Insert ( 0 , defaultValue ) ;
42+ list . Insert ( 0 , defaultValue ) ;
4443 }
4544 catch ( Exception ex )
4645 {
@@ -53,14 +52,13 @@ protected override void OnAttached()
5352 }
5453 else if ( AssociatedObject . SelectedIndex == 0 )
5554 {
56- dynamic items = AssociatedObject . ItemsSource ;
57- var list = items as IList ;
55+ var list = AssociatedObject . ItemsSource as IList ;
5856 Debug . Assert ( list != null , "ItemsSource data source is not an IList, cannot change it." ) ;
5957 Debug . Assert ( list . Count > 0 , "ItemsSource data source is empty, something went wrong." ) ;
6058 if ( list == null || list . Count == 0 )
6159 return ;
62- if ( items [ 0 ] == defaultValue )
63- items . RemoveAt ( 0 ) ;
60+ if ( list [ 0 ] == defaultValue )
61+ list . RemoveAt ( 0 ) ;
6462 }
6563 }
6664 if ( e . RemovedItems . Count > 0 )
Original file line number Diff line number Diff line change 156156 Margin =" 5,0,0,0"
157157 VerticalAlignment =" Center"
158158 Content =" {Binding SelectedState}"
159- HasDropDown =" True" />
159+ HasDropDown =" True" >
160+ <i : Interaction .Triggers>
161+ <i : EventTrigger EventName =" Click" >
162+ <ui : OpenPopupAction TargetName =" statePopup" />
163+ </i : EventTrigger >
164+ </i : Interaction .Triggers>
165+ </ui : GitHubActionLink >
160166
161167 <Popup x : Name =" statePopup"
162168 AllowsTransparency =" True"
You can’t perform that action at this time.
0 commit comments