2011-08-02 42 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*/ 
相關問題