0

I Need Vertical Scroll to be synchronized with 2 Listview - inside Gridview in view.

Only the Row should be scrolled not the header.

I have been used http://www.codeproject.com/Articles/39244/Scroll-Synchronization

<ListView  Name="ListBox1" Margin="0,0,5,0" >
        <ListView.Resources>
            <Style TargetType="ScrollViewer">
                <Setter Property="local:ScrollSynchronizer.ScrollGroup" Value="Group1" />
            </Style>
        </ListView.Resources>
        <ListView.View>
            <GridView x:Name="grid1Control" >
                <GridViewColumn Header="12">
                    <GridViewColumn.CellTemplate>
                        <DataTemplate>
                            <Grid >
                                <TextBox Text="123" Height="30" Width="120"/>
                            </Grid>
                        </DataTemplate>
                    </GridViewColumn.CellTemplate>
                </GridViewColumn>
            </GridView>
        </ListView.View>
    </ListView>


    <ListView  Name="ListBox2" Grid.Column="1"  Margin="5,0,0,0"  >
        <ListView.Resources>
            <Style TargetType="ScrollViewer">
                <Setter Property="local:ScrollSynchronizer.ScrollGroup" Value="Group1" />
            </Style>
        </ListView.Resources>
        <ListView.View>
            <GridView x:Name="grid2Control" >
                <GridViewColumn Header="12">
                    <GridViewColumn.CellTemplate>
                        <DataTemplate>
                            <Grid >
                                <TextBox Text="123" Height="30" Width="120"/>
                            </Grid>
                        </DataTemplate>
                    </GridViewColumn.CellTemplate>
                </GridViewColumn>
            </GridView>
        </ListView.View>
    </ListView>

Above code not working

0 Answers0