Subby
Subby

Reputation: 5480

WP8 Mail Pivot App

I wish to copy the same mechanics of the Mail app in Windows Phone 8.

When you fire the Mail app, it allows you to select an email which will, in a cool animated fashion, open up the email showing it's Subject, Body etc etc.

How can I achieve this in the default Pivot app?

Pivot XAML code:

<phone:Pivot Title="Read the Signs" Background="White" Foreground="Black">
    <!--Pivot item one-->
    <phone:PivotItem Header="abc" Foreground="Black">
        <!--Double line list with text wrapping-->
        <phone:LongListSelector Margin="0,0,-12,0" ItemsSource="{Binding}">
            <phone:LongListSelector.ItemTemplate>
                <DataTemplate>
                    <StackPanel Margin="0,0,0,17">
                        <TextBlock Text="{Binding Location}" TextWrapping="Wrap" Style="{StaticResource PhoneTextExtraLargeStyle}" Foreground="Black"/>
                    </StackPanel>
                </DataTemplate>
            </phone:LongListSelector.ItemTemplate>
        </phone:LongListSelector>
    </phone:PivotItem>
       ......
       ......
       ......
</phone:Pivot>

In this application, the TextBlock which has a text binding of Location is the item which I want to be clickable and for a new Window to open. Just like the Mail app...

Any ideas how I can achieve this?

Upvotes: 0

Views: 153

Answers (1)

Shawn Kendrot
Shawn Kendrot

Reputation: 12465

To accomplish a simple slide up transition you can the approach in this blog. It creates simple extension methods that allow you to slide the content of the page up when it is navigated to.

protected override async void OnNavigatedTo(NavigationEventArgs e)
{
    base.OnNavigatedTo(e);

    try
    {
        await LayoutRoot.TransitionInSlideUp();
    }
    catch { }
}

Upvotes: 1

Related Questions