1
votes

I am looking to design a time table, where the first row and first column act as headers. The control should support both horizontal swipe and vertical scroll and the contents of the cell should change as per its row/column position when scrolled horizontally or vertically.

1
to achieve such control you could use listbox and format its data templete according to your requirement - Pradeep Kesharwani
Maybe this article helps: silverlightshow.net/items/… - Flat Eric
use a scrollviewer, and have a grid untop where you change the content upon scroll - JTIM
it will be more helpful if anyone can share the XAML on how it can be done - theEternalStudent

1 Answers

1
votes

Here is your XAML:

<phone:LongListSelector ItemsSource="{Binding}">
    <phone:LongListSelector.ItemTemplate>
        <DataTemplate>
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="4*"/>
                    <ColumnDefinition Width="1*"/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="{Binding Item}" TextWrapping="Wrap" Grid.Column="0"/>
                <TextBlock Text="{Binding Qty}" Grid.Column="1"/>
            </Grid>
        </DataTemplate>
    </phone:LongListSelector.ItemTemplate>
</phone:LongListSelector>

Now here you bind ViewModel to ItemSource. And inside data Template you bind fields of table.