我有一个要在工具提示中显示的列表,但如果该列表为空,则该工具提示不应存在。但是,当它为空时,它仍然显示一个非常小的空框。
<t:RadDropDownButton.ToolTip>
<t:RadToolTip Visibility="{Binding MyList, Converter={StaticResource EmptyListToCollapsedConverter}}"
Content="{Binding MyList}">
<t:RadToolTip.ContentTemplate>
<DataTemplate>
<ItemsControl ItemsSource="{Binding}"/>
</DataTemplate>
</t:RadToolTip.ContentTemplate>
</t:RadToolTip>
</t:RadDropDownButton.ToolTip>这有什么问题吗?在使用RadToolTip的任何地方都会发生这种情况。设置它的可见性不起作用!
发布于 2014-05-19 10:01:33
我问这个问题已经有一段时间了,但事实证明我没有正确地使用控件。工具提示应该应用在不同的地方。对不起,我只记得这么多了!
发布于 2013-01-27 11:17:35
我认为即使你只使用Tooltip类也会发生这种情况。MS不会假定工具提示不会显示。如果设置了元素的tooltip属性并希望隐藏/隐藏它,则将附加的ToolTipService.IsEnabled设置为false。
https://stackoverflow.com/questions/14529178
复制相似问题