Why is the TextBlock not the OriginalSource on the Routed Event?
问题 I'm showing a context menu for elements in a ListView . The context menu is attached to the TextBlock s of the ListView as follows. <ListView.Resources> <ContextMenu x:Key="ItemContextMenu"> <MenuItem Command="local:MyCommands.Test" /> </ContextMenu> <Style TargetType="{x:Type TextBlock}" > <Setter Property="ContextMenu" Value="{StaticResource ItemContextMenu}" /> </Style> </ListView.Resources> The context menu properly shows up and the RoutedUIEvent is fired as well. The issue is that in the