This is a migrated thread and some comments may be shown as answers.

How to display tooltip for a disabled Listbox items.

2 Answers 263 Views
ListBox
This is a migrated thread and some comments may be shown as answers.
Chocks
Top achievements
Rank 1
Chocks asked on 18 Dec 2012, 11:55 AM
Hi,

I am having a listbox, which will disable and enable at runtime, I need to get the tooltip to be displayed for the listbox items, even when it is disabled. Currently tooltip is working only when the listbox is enabled. 

 ListBox x:Name="lstEpisod" ItemsSource="{Binding ScopeDetails,Mode=TwoWay}" Height="115" Width="212" ScrollViewer.HorizontalScrollBarVisibility="Hidden" Background="#FFF3F3F3" ItemTemplate="{StaticResource EpisodeEncounterTemplate}" Margin="0,5,0,2" TabIndex="0" HorizontalAlignment="Left"> 
<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem"> 
 <Setter Property="Padding" Value="0" /> 
 <Setter Property="Margin" Value="0"/> 
 <Setter Property="BorderThickness" Value="0"/> 
 <Setter Property="Background" Value="#FFF3F3F3"/> 
 <Setter Property="Foreground" Value="Black"/> 
</Style>
<!--<Setter Property="ToolTipService.ToolTip" Value="{Binding Text, RelativeSource={RelativeSource Self}}"/>--> 
</ListBox.ItemContainerStyle
</ListBox>

 
Thanks for any support.
Regards,
V.Chocks.

2 Answers, 1 is accepted

Sort by
0
Kevin
Top achievements
Rank 1
answered on 15 Jul 2015, 06:30 PM
i am interesting if you ever found a solution to this. I have the same issue with WPF
0
Nasko
Telerik team
answered on 16 Jul 2015, 09:07 AM
Hello Kevin,

In order to visualize the ToolTip when the items are disabled you need to set the ShowOnDisabled property of the ToolTipService class to "True". Please, check the attached sample project that demonstrates that approach and let us know if it worked for you. 

Please, notice the proposed approach only works for WPF.

Hopes this helps.

Regards,
Nasko
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
ListBox
Asked by
Chocks
Top achievements
Rank 1
Answers by
Kevin
Top achievements
Rank 1
Nasko
Telerik team
Share this question
or