ここで問題。ItemsControlがあり、ユーザーがItemsControlの上にマウスを置いた場合にToolTipを表示したいと考えています。簡単そうですよね?
ここに例があります:
<ItemsControl BorderBrush="Blue" BorderThickness="1">
<ItemsControl.ToolTip>
<ToolTip Content="Text" />
</ItemsControl.ToolTip>
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<Label BorderBrush="Red" BorderThickness="1">One</Label>
<Label BorderBrush="Red" BorderThickness="1">Two</Label>
<Label BorderBrush="Red" BorderThickness="1">Three</Label>
<Label BorderBrush="Red" BorderThickness="1">Four</Label>
<Label BorderBrush="Red" BorderThickness="1">Five</Label>
<Label BorderBrush="Red" BorderThickness="1">Six</Label>
<Label BorderBrush="Red" BorderThickness="1">Seven</Label>
</ItemsControl>
ウィンドウの幅を十分に小さくし、WrapPanelにアイテムをラップさせます。そして、ItemsControl にカーソルを合わせてみてください( ToolTipは表示されません) 。Label にカーソルを合わせます( ToolTipが表示されます)。
この動作が正しい理由と、この場合にツールヒントを強制的に表示する方法を教えてください。