File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -658,11 +658,11 @@ protected override void OnDropDownOpened(EventArgs e)
658
658
659
659
if ( this . SelectedItem is not null )
660
660
{
661
- var selectedItemContainer = this . ItemContainerGenerator . ContainerOrContainerContentFromItem < IInputElement > ( this . SelectedItem ) ;
662
- if ( selectedItemContainer is not null )
663
- {
664
- Keyboard . Focus ( selectedItemContainer ) ;
665
- }
661
+ var selectedItemContainer = this . ItemContainerGenerator . ContainerOrContainerContentFromItem < IInputElement > ( this . SelectedItem ) ;
662
+ if ( selectedItemContainer is not null )
663
+ {
664
+ Keyboard . Focus ( selectedItemContainer ) ;
665
+ }
666
666
}
667
667
668
668
this . focusedElement = Keyboard . FocusedElement ;
@@ -678,8 +678,6 @@ protected override void OnDropDownOpened(EventArgs e)
678
678
this . scrollViewer . Height = double . NaN ;
679
679
}
680
680
681
- var popupChild = this . DropDownPopup ? . Child as FrameworkElement ;
682
-
683
681
var initialHeight = Math . Min ( RibbonControl . GetControlWorkArea ( this ) . Height * 2 / 3 , this . MaxDropDownHeight ) ;
684
682
685
683
if ( double . IsNaN ( this . DropDownHeight ) == false )
@@ -693,7 +691,7 @@ protected override void OnDropDownOpened(EventArgs e)
693
691
this . scrollViewer . Height = initialHeight ;
694
692
}
695
693
696
- popupChild ? . UpdateLayout ( ) ;
694
+ this . DropDownPopup ? . Child ? . UpdateLayout ( ) ;
697
695
}
698
696
699
697
/// <inheritdoc />
You can’t perform that action at this time.
0 commit comments