我需要的是将项目边框设置为10。
Designer视图继续抛出异常,因此我无法继续。
<phone:Pivot.ItemTemplate>
<DataTemplate>
<phone:PivotItem Margin="10"/>
</DataTemplate>
</phone:Pivot.ItemTemplate>
这段代码出了什么问题?
答案 0 :(得分:0)
抱歉,我没有意识到这是WP8。在WP8上,phone 是 Pivots的默认命名空间。这虽然很随意。你确定问题不在其他地方吗?分享你的XAML对你来说仍然有帮助,但这里有一些对我有用:
<phone:Pivot>
<phone:Pivot.ItemTemplate>
<DataTemplate>
<phone:PivotItem Margin="10">
<Grid>
<!--Contents of template-->
</Grid>
</phone:PivotItem>
</DataTemplate>
</phone:Pivot.ItemTemplate>
<phone:PivotItem Header="Hello">
<Grid>
<!--Contents of "Hello" item-->
</Grid>
</phone:PivotItem>
<phone:PivotItem Header="World">
<Grid>
<!--Contents of "World" item-->
</Grid>
</phone:PivotItem>
</phone:Pivot>