2011-08-02 45 views

回答

2

ToolTipContentControl,而不是ItemsControl。这意味着它可能只包含单个元素而不包含集合。

要显示的多个项目的ToolTip您需要将一些ItemsControlListBox,例如)到TabControl,然后使用它ItemsSource属性。

ListBox list = new ListBox(); 
ToolTip tooltip = new ToolTip(); 
ListBox tooltipList = new ListBox(); 

list.ToolTip = tooltip; 
tooltip.Content = tooltipList; 
tooltipList.ItemsSource = /*your source*/ 
相关问题