这是我的Xaml,
<Grid Background="Transparent">
<ScrollViewer Name="Sv1" Margin="0 20 0 0 ">
<StackPanel Orientation="Horizontal">
<TextBlock Text=" Ok " />
<TextBlock Text=" Ok " />
<TextBlock Text=" Ok " />
<TextBlock Text=" Ok " />
<TextBlock Text=" Ok " Name="BtnOk"
Foreground="Red"
MouseLeftButtonDown="UIElement_OnMouseLeftButtonDown"
Panel.ZIndex="5000" />
<TextBlock Text=" Ok " />
</StackPanel>
</ScrollViewer>
<ScrollViewer Name="Sv2" Margin="0 20 0 0 "
VerticalScrollBarVisibility="Auto"
HorizontalScrollBarVisibility="Auto">
<VirtualizingStackPanel Orientation="Horizontal">
<TextBlock Text=" This Test " Panel.ZIndex="5" />
<TextBlock Text=" This Test " Panel.ZIndex="5" />
<TextBlock Text=" This Test " Panel.ZIndex="5" />
<TextBlock Text=" This Test " Panel.ZIndex="5" />
<TextBlock Text=" This Test " Panel.ZIndex="5" />
<TextBlock Text=" This Test " Panel.ZIndex="5" />
<TextBlock Text=" This Test " Panel.ZIndex="5" />
<TextBlock Text=" This Test " Panel.ZIndex="5" />
<TextBlock Text=" This Test " Panel.ZIndex="5" />
<TextBlock Text=" This Test " Panel.ZIndex="5" />
<TextBlock Text=" This Test " Panel.ZIndex="5" />
<TextBlock Text=" This Test " Panel.ZIndex="5" />
<TextBlock Text=" This Test " Panel.ZIndex="5" />
<TextBlock Text=" This Test " Panel.ZIndex="5" />
<Rectangle Canvas.Right="10" Margin="10 0 0 0" Fill="Red" Width="254" HorizontalAlignment="Right"/>
</VirtualizingStackPanel>
</ScrollViewer>
我希望“Sv2”超过“Sv1” - 这没关系 - 我想点击“BtnOk”,但不能正常工作MouseLeftButtonDown?
如果“Sv1”在“Sv2”上,则单击“提升”,但如果“Sv2”超过“Sv1”,则单击“提升”。