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

ToolTip per Item

1 Answer 83 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Lucas
Top achievements
Rank 1
Lucas asked on 14 Jul 2009, 04:25 PM
Is there a way to configure a tooltip for the items in the RadCombo for silverlight?  I need each one to have a tip.

Thanks, 

1 Answer, 1 is accepted

Sort by
0
Boyan
Telerik team
answered on 17 Jul 2009, 03:29 PM
Hello Lucas,

There is a way to configure a tooltip for each element of a RadCombobox. I have attached a simple project how you can attach manually to each element, all declared in xaml. Of course you can add it to a databinded RadCombobox if you put it into the DataTemplate. Here is a simple code how it can be done:

 <Grid.Resources> 
            <DataTemplate x:Key="ComboBoxCustomTemplate"
                <Grid Margin="5,5,5,5" Width="350" m:ToolTipService.ToolTip="{Binding Name}" > 
                    <Grid.ColumnDefinitions> 
                        <ColumnDefinition /> 
                        <ColumnDefinition /> 
                    </Grid.ColumnDefinitions> 
                    <Grid.RowDefinitions> 
                        <RowDefinition /> 
                        <RowDefinition /> 
                    </Grid.RowDefinitions> 
                    <TextBlock FontWeight="Bold" Grid.ColumnSpan="2" Text="{Binding Name}" /> 
                    <TextBlock Grid.Row="1" Text="Phone:" /> 
                    <TextBlock Grid.Row="1" Foreground="Blue" Margin="40,0,0,0" 
                            Text="{Binding Phone}" /> 
                    <TextBlock Grid.Row="1" Grid.Column="1" Text="Zip:" /> 
                    <TextBlock Grid.Row="1" Foreground="Blue" Grid.Column="1" Margin="26,0,0,0" 
                            Text="{Binding Zip}" /> 
                </Grid> 
            </DataTemplate> 
            <DataTemplate x:Key="ComboBoxSimpleTemplate"
                <Grid> 
                    <TextBlock Foreground="Red" Text="{Binding Name}" /> 
                </Grid> 
            </DataTemplate> 
        </Grid.Resources> 

 This code block is from our online Databinding demo. I have just added the tooltip to the grid that wraps the items.

Hope that helps. If you need more help please let me know.

Regards,
Boyan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
ComboBox
Asked by
Lucas
Top achievements
Rank 1
Answers by
Boyan
Telerik team
Share this question
or