locked
Full width background in Panorama.Header RRS feed

  • Question

  • I am trying to give the panoramaheader a background but for some reasons it doesn't fill everything. There seem to be a slight margin as you can see in this image. <link is removed because account isn't verified yet>

    Yet I have not assigned a margin in the code

           
            <phone:Panorama Background="Orange">
                <phone:Panorama.Title>
                    <Grid Background="#FF4B77BE" >
                        <TextBlock Text="space hub"  />
                    </Grid>           
                </phone:Panorama.Title>
                <phone:PanoramaItem Background="White">
                    <phone:PanoramaItem.Header>
                        <StackPanel>
                            <TextBlock Text="news" Foreground="White"/>
                            <ProgressBar x:Name="pgrNews" IsIndeterminate="True" Foreground="White" Width="386" />
                        </StackPanel>
                    </phone:PanoramaItem.Header>

    Why doesn't the background fill everything? And how can I let it do that?

    Thursday, November 20, 2014 11:08 AM

Answers

  • Hi Arn Vanhoutte,

    >>I am trying to give the panoramaheader a background but for some reasons it doesn't fill everything.

    Please try to right click the Panorama control, then click "Edit Template"->"Edit a copy", after that you will see the style for the Panorama control, then please try to modify the margin or the padding in the style to let the PanoramaItem full fill with the width screen.

    Besides, I will recommand you use the Pivot control instead of the Panorama control. The following xaml code will let the PivotItem full fill with the width screen, please try to check it:

          <phone:Pivot Margin="-10,0,-15,0" HorizontalAlignment="Left" Height="607" VerticalAlignment="Top" Width="481">
                    <phone:Pivot.Title>
                        <Grid Background="#FF4B77BE">
                            <TextBlock Text="space hub"  />
                        </Grid>
                    </phone:Pivot.Title>
                    <phone:PivotItem Margin="0,0,-352,-468" CacheMode="{x:Null}" Background="White">
                        <phone:PivotItem.Header>
                            <StackPanel>
                                <TextBlock Text="news" Foreground="White"/>
                                <ProgressBar x:Name="pgrNews" IsIndeterminate="True" Foreground="White" Width="386" />
                            </StackPanel>
                        </phone:PivotItem.Header>
                    </phone:PivotItem>
                </phone:Pivot>

    Best Regards,
    Amy Peng

    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.





    Friday, November 21, 2014 8:43 AM