C#
public class PanoramaFullScreen : Panorama
{
protected override System.Windows.Size MeasureOverride(System.Windows.Size availableSize)
{
availableSize.Width += 48;
return base.MeasureOverride(availableSize);
}
}
XAML
<Style x:Key="PanoramaItemStyle1" TargetType="phone:PanoramaItem">
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
<Setter Property="VerticalContentAlignment" Value="Stretch"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="phone:PanoramaItem">
<Grid Background="{TemplateBinding Background}" Margin="0,0,0,0">
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<ContentControl x:Name="header" CharacterSpacing="-35" ContentTemplate="{TemplateBinding HeaderTemplate}" Content="{TemplateBinding Header}" FontSize="66" FontFamily="{StaticResource PhoneFontFamilySemiLight}" HorizontalAlignment="Left" Margin="12,-2,0,38">
<ContentControl.RenderTransform>
<TranslateTransform x:Name="headerTransform"/>
</ContentControl.RenderTransform>
</ContentControl>
<ContentPresenter Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" Grid.Row="1" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
ItemContainerStyle="{StaticResource PanoramaItemStyle1}"
は、より良い選択肢であるように思われます。 – TutuGeorge
PivotItemトランジションアニメーションは適していません。コンテンツが左右対称にピークを迎えるパノラマを使用して別々のビューを作成したいので、デフォルトのレイアウト/マージン/サイズを変更する方法がわかります。 – Hardev
Hardev以下の答えを解決策としてマークしてください。それは良いことです。 – AdvancedREI