Layout Options

Jun 23, 2011 at 2:05 PM

Hi,

I would like to have an app with two list screens. One for tweets, and one for RSS. Both list screens like the first screen in the default example and to remove the tiled pictures screen.

 

So i am looking at changing MainPage.xaml

I see this

<!--    Layout Option 2: Panorama with list for each social media type -->

But with details removed. Has somebody got the XAML for tweets, RSS aleady?

Or can someone give me pointers on what I need to change, in particular how to bind to second data set?

Jun 24, 2011 at 12:56 AM

I use the same binding, just change the ItemTemplate.  Grab the trail of "Azure Feeds" from the marketplace to see it in action.

<controls:PanoramaItem Header="{Binding ListActivitiesTitle}">
     <Grid>
      <Grid.RowDefinitions>
       <RowDefinition Height="Auto" />
       <RowDefinition Height="*" />
      </Grid.RowDefinitions>
      <rlb:PullDownToRefreshPanel x:Name="RefreshPanel"
             Style="{StaticResource PullDownStyle}"
             RefreshRequested="RefreshRequested"
             Grid.Row="0" />
      <AzureAggregator:LazyListBox x:Name="ActivitiesList"
                                            Grid.Row="1"
                                            ItemTemplate="{StaticResource ActivityItemTemplate}"
           Source="{Binding ListActivities.Activities}"
           SelectionChanged="SelectionChanged"
            />
     </Grid>
    </controls:PanoramaItem>
    <controls:PanoramaItem Header="{Binding TiledActivitiesTitle}">
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="*" />
                        </Grid.RowDefinitions>
                        <rlb:PullDownToRefreshPanel x:Name="RefreshPanelPI2"
             Style="{StaticResource PullDownStyle}"
             RefreshRequested="RefreshRequested"
             Grid.Row="0" />
                        <AzureAggregator:LazyListBox
          x:Name="TiledActivitiesList"
                                        Grid.Row="1"
                                        ItemTemplate="{StaticResource ActivityItemTemplate}"
          Source="{Binding TiledActivities.Activities}"
          SelectionChanged="SelectionChanged"/>
                    </Grid>
                </controls:PanoramaItem>
    <controls:PanoramaItem Header="Misc Topics" Orientation="Horizontal">
     <StackPanel Orientation="Horizontal" d:LayoutOverrides="Height">
      <ScrollViewer Width="432">
       <ListBox ItemsSource="{Binding PivotItemLinks}"
        ScrollViewer.VerticalScrollBarVisibility="Disabled"
        SelectionChanged="MenuSelectionChanged" ItemTemplate="{StaticResource LinkItemTemplate}"/>
      </ScrollViewer>
      <ScrollViewer Width="432" Margin="12,0,0,0">
       <ListBox ItemsSource="{Binding Links}"
        ScrollViewer.VerticalScrollBarVisibility="Disabled"
        SelectionChanged="MenuSelectionChanged" ItemTemplate="{StaticResource LinkItemTemplate}"/>
      </ScrollViewer>
     </StackPanel>
    </controls:PanoramaItem>

Jun 24, 2011 at 9:49 AM

Thanks, that worked fine.