WPF,ToolTip工具提示的位置怎么没对啊
<Window x:Class="WPF1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:WPF1"
Title="MainWindow" Height="550" Width="825">
<Grid>
<Ellipse Height="25" Width="50" Fill="Gray" HorizontalAlignment="Left">
<Ellipse.ToolTip>
<ToolTip Placement="Right" PlacementTarget="{Binding ElementName=Button2}" HorizontalOffset="50" VerticalOffset="-70" HasDropShadow="false">
张三
</ToolTip>
</Ellipse.ToolTip>
</Ellipse>
<Button Name="Button2" Content="Button2" HorizontalAlignment="Left" Margin="130,354,0,0" VerticalAlignment="Top" Width="74"/>
</Grid>
</Window>

上面的代码中,设置了ToolTip 的Placement属性值为Right,PlacementTarget值为Button2,然后又设置了HorizontalOffset和VerticalOffset值。那当鼠标移到Ellipse 上时,提示框的弹出位置就应该是以Button2的位置来计算的吧。
可是,为什么结果提示框的弹出位置还是以Ellipse的位置来进行计算的呢?
...全文


