【发布时间】:2015-09-22 09:59:57
【问题描述】:
我有两个文件 MyPagePort.xaml 和 MyPageLand.xaml 用于纵向和横向。我还想要一个“集成器”MyPage.xaml, 它使用 VisualStateManager 在纵向和横向布局之间切换。
<VisualStateManager.VisualStateGroups>
<VisualStateGroup>
<VisualState x:Name="Portrait>
include MyPagePort.xaml
</VisualState>
<VisualState x:Name="Landscape">
include MyPageLand.xaml
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
问题是我找不到包含多个 XAML 的方法。我只需要类似于 Android 中的“包含”的东西。
我发现了许多 WPF 示例(或),但似乎都不适用于 Windows Universal。
【问题讨论】: