【问题标题】:Add a landscape page to a pivot view将横向页面添加到透视视图
【发布时间】:2013-07-19 13:10:01
【问题描述】:

我正在尝试将一个横向页面添加到我的透视视图中。 其余页面为纵向页面。

我怎样才能做到这一点?

这是我想要的样本

<phone:PhoneApplicationPage
    x:Class="BitcoinTicker.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DataContext="{d:DesignData SampleData/MainViewModelSampleData.xaml}"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait"  Orientation="Portrait">

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">

        <!--Pivot Control-->
        <phone:Pivot Title="App title">

            <!--Pivot item one-->
            <phone:PivotItem Header="First">
                <!-- Portrait page -->
            </phone:PivotItem>

            <!--Pivot item two-->
            <phone:PivotItem Header="Second">
                <!-- Landscape page -->
            </phone:PivotItem>

        <!--Pivot item three -->
            <phone:PivotItem Header="Third">
                <!-- Portrait page -->
            </phone:PivotItem>
        </phone:Pivot>

    </Grid>
</phone:PhoneApplicationPage>

干杯

【问题讨论】:

  • 如果您想模仿图片应用程序,您应该使用全景,而不是枢轴。 PanoramaItem 有一个支持“宽”内容的Orientation 属性
  • 不,我只想以横向而不是纵向显示一个图形项。

标签: c# .net xaml windows-phone-8 pivotviewer


【解决方案1】:

您可能应该使用全景图并遵循某些 Windows Phone 设计指南。此处详细说明:http://msdn.microsoft.com/library/windows/apps/hh202912(v=vs.105).aspx

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-06-08
    相关资源
    最近更新 更多