Custom tooltip for listbox item in WPF

后端 未结 3 1281
遥遥无期
遥遥无期 2021-01-22 23:31

I\'ve got a ListBox that displays an ObservableCollection of Talent objects. When the user hovers over each item in the ListBox, I\'d like to display in the ToolTip several piec

3条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-23 00:08

    I don't know whether I've experience the same issue as the OP, but the source of trouble for me was the following implicit style:

    
    

    The purpose of this style was to eliminate long-winded tooltips from exceeding viewable screen area, but it only works on standard, inline tooltips. Attempting to create a custom, elaborate tooltip resulted in the "System.Windows.Controls.StackPanel" that the OP reported. Removing this implicit style immediately resolved the issue... however also removes the nice 600 DIP width restriction.

提交回复
热议问题