@@ -37,7 +37,7 @@ public SidebarItem()
37
37
{
38
38
if ( args . Key == Windows . System . VirtualKey . Enter )
39
39
{
40
- Clicked ( ) ;
40
+ Clicked ( PointerUpdateKind . Other ) ;
41
41
args . Handled = true ;
42
42
}
43
43
} ;
@@ -237,7 +237,7 @@ private void ChildrenPresenter_ElementPrepared(ItemsRepeater sender, ItemsRepeat
237
237
}
238
238
}
239
239
240
- internal void Clicked ( )
240
+ internal void Clicked ( PointerUpdateKind pointerUpdateKind )
241
241
{
242
242
if ( IsGroupHeader )
243
243
{
@@ -250,12 +250,12 @@ internal void Clicked()
250
250
SetFlyoutOpen ( true ) ;
251
251
}
252
252
}
253
- RaiseItemInvoked ( ) ;
253
+ RaiseItemInvoked ( pointerUpdateKind ) ;
254
254
}
255
255
256
- internal void RaiseItemInvoked ( )
256
+ internal void RaiseItemInvoked ( PointerUpdateKind pointerUpdateKind )
257
257
{
258
- Owner ? . RaiseItemInvoked ( this ) ;
258
+ Owner ? . RaiseItemInvoked ( this , pointerUpdateKind ) ;
259
259
}
260
260
261
261
private void SidebarDisplayModeChanged ( SidebarDisplayMode oldValue )
@@ -386,10 +386,11 @@ private void Item_PointerReleased(object sender, Microsoft.UI.Xaml.Input.Pointer
386
386
UpdatePointerState ( ) ;
387
387
388
388
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 )
391
392
{
392
- Clicked ( ) ;
393
+ Clicked ( pointerUpdateKind ) ;
393
394
}
394
395
}
395
396
0 commit comments