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

Changing Scroll Tip

1 Answer 42 Views
GridView
This is a migrated thread and some comments may be shown as answers.
JTango
Top achievements
Rank 1
JTango asked on 27 Oct 2008, 06:19 AM
Is there a way to set the "scroll tip" for the GridView. By default it appears that the first column in the grid is used, but I'd like to change this. Is it possible?

Regards

Justin Taylor

1 Answer, 1 is accepted

Sort by
0
Atanas
Telerik team
answered on 27 Oct 2008, 11:24 AM
Hello JTango,

To achieve the functionality of your scenario, all you have to do is to write a style affecting our ScrollPositionIndicator which takes care about displaying a tool tip while scrolling:

<Style TargetType="{x:Type telerik:ScrollPositionIndicator}"
                <Setter Property="Template"
                    <Setter.Value> 
                        <ControlTemplate TargetType="{x:Type telerik:ScrollPositionIndicator}"
                            <Border HorizontalAlignment="Right" Width="Auto" Height="Auto" BorderBrush="#7FC2CCE1" BorderThickness="1,1,1,1" CornerRadius="8,8,8,8" SnapsToDevicePixels="True" VerticalAlignment="Center" > 
                                <Border Width="Auto" BorderBrush="#FFF6F1EC" BorderThickness="1,1,1,1" Height="Auto" CornerRadius="7,7,7,7"
                                    <Border.Background> 
                                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"
                                            <GradientStop Color="#7FC2CCE1" Offset="1"/> 
                                            <GradientStop Color="#BFC2CCE1" Offset="0"/> 
                                        </LinearGradientBrush> 
                                    </Border.Background> 
                                    <Border Width="Auto" BorderBrush="#FF899BC1" BorderThickness="1,1,1,1" Height="Auto" CornerRadius="5,5,5,5" Background="#FFEBEFF7" Margin="5,5,5,5"
                                        <ContentPresenter Margin="40,5,40,6" Content="{Binding Path=Data.Name}" /> 
                                    </Border> 
                                </Border> 
                            </Border> 
                        </ControlTemplate> 
                    </Setter.Value> 
                </Setter> 
            </Style> 

Here is the most important part:

<ContentPresenter Margin="40,5,40,6" Content="{Binding Path=Data.Name}" /> 




I am binding the content of the control to the property 'Name' of the binding object.

I am attaching you a sample project.

Best wishes,
Atanas
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
GridView
Asked by
JTango
Top achievements
Rank 1
Answers by
Atanas
Telerik team
Share this question
or