Question with your example

4 posts, 1 answers
  1. Leo
    Leo avatar
    49 posts
    Member since:
    Oct 2010

    Posted 04 Nov 2010 Link to this post

    Hi, I was browsing your code example in Telerik WP7 and I notice your Panorama Item[1] overlaps whats suppose to be for PanoramaItem[2].

    How did you do this? The items for PanoramaItem[1] exceeds the phone window? I'm trying to change the size of the width of the itemcontrol or contents but it still won't exceed the windows phone.
  2. Valentin.Stoychev
    Admin
    Valentin.Stoychev avatar
    2198 posts

    Posted 04 Nov 2010 Link to this post

    Hi Leo,

    the source code of the examples is included in the solution you have downloaded. You ch eck the MainContent.xaml page in the Examples_WP project.

    Basically what it is done is that the second item of the panorama is just a placeholder - e.g. an empty item. The first item in the panorama is a wider one and has a negative margin set. Here is a code snippet:

    <controls:PanoramaItem Header="What's new" Style="{StaticResource HomePanoramaItem}">
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <QSF:HomePanoramaSloganControl Grid.Column="0"/>
            <QSF:WhatsNewControl Grid.Column="1" Margin="-95, 0, -480, 0"/>
        </Grid>
    </controls:PanoramaItem>
    <controls:PanoramaItem Style="{StaticResource HomePanoramaItem}" Padding="0,-2,0,26">
    </controls:PanoramaItem>

    Please let us know if you need further details!

    All the best,
    Valentin.Stoychev
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. DevCraft banner
  4. Leo
    Leo avatar
    49 posts
    Member since:
    Oct 2010

    Posted 04 Nov 2010 Link to this post

    I tried making my second item blank and my first item wider but it won't exceed the phone page. The rectangle part, so even if I have a width of 1000 and it expands, in runtime/UI when i go to second item of panorama the contents of the first items are cut in the rectangle.
  5. Answer
    Deyan
    Admin
    Deyan avatar
    2041 posts

    Posted 05 Nov 2010 Link to this post

    Hi Leo,

    Thanks for getting back to us.

    I have prepared a very simple Windows Phone Panorama Application for you that implements the scenario in question. Take a look at it.

    In fact, you should not set any properties on the panorama items, but simply set the negative right margin on the content in the first panorama item.

    In my application I have two panorama items: in the first one I've put a rectangle which extends to the second panorama item. The second item is empty.

    I hope this helps.

    Do not hesitate to write back in case of further questions.

    Greetings,
    Deyan
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top