@@ -37,7 +37,7 @@ public SidebarItem()
3737 {
3838 if ( args . Key == Windows . System . VirtualKey . Enter )
3939 {
40- Clicked ( ) ;
40+ Clicked ( PointerUpdateKind . Other ) ;
4141 args . Handled = true ;
4242 }
4343 } ;
@@ -237,7 +237,7 @@ private void ChildrenPresenter_ElementPrepared(ItemsRepeater sender, ItemsRepeat
237237 }
238238 }
239239
240- internal void Clicked ( )
240+ internal void Clicked ( PointerUpdateKind pointerUpdateKind )
241241 {
242242 if ( IsGroupHeader )
243243 {
@@ -250,12 +250,12 @@ internal void Clicked()
250250 SetFlyoutOpen ( true ) ;
251251 }
252252 }
253- RaiseItemInvoked ( ) ;
253+ RaiseItemInvoked ( pointerUpdateKind ) ;
254254 }
255255
256- internal void RaiseItemInvoked ( )
256+ internal void RaiseItemInvoked ( PointerUpdateKind pointerUpdateKind )
257257 {
258- Owner ? . RaiseItemInvoked ( this ) ;
258+ Owner ? . RaiseItemInvoked ( this , pointerUpdateKind ) ;
259259 }
260260
261261 private void SidebarDisplayModeChanged ( SidebarDisplayMode oldValue )
@@ -386,10 +386,11 @@ private void Item_PointerReleased(object sender, Microsoft.UI.Xaml.Input.Pointer
386386 UpdatePointerState ( ) ;
387387
388388 VisualStateManager . GoToState ( this , IsExpanded ? "ExpandedIconNormal" : "CollapsedIconNormal" , true ) ;
389- var updateKind = e . GetCurrentPoint ( null ) . Properties . PointerUpdateKind ;
390- if ( updateKind == PointerUpdateKind . LeftButtonReleased )
389+ var pointerUpdateKind = e . GetCurrentPoint ( null ) . Properties . PointerUpdateKind ;
390+ if ( pointerUpdateKind == PointerUpdateKind . LeftButtonReleased ||
391+ pointerUpdateKind == PointerUpdateKind . MiddleButtonReleased )
391392 {
392- Clicked ( ) ;
393+ Clicked ( pointerUpdateKind ) ;
393394 }
394395 }
395396
0 commit comments