[英]How to use PivotViewer in Silverlight xaml?
如何在Silverlight xaml中使用PivotViewer? 我閱讀了http://msdn.microsoft.com/en-us/library/system.windows.controls.pivot.pivotviewer(v=vs.95).aspx並添加了對程序集的引用。但是我收到錯誤
名稱“PivotViewer”在名稱空間“ http://schemas.microsoft.com/client/2007 ”中不存在。
這是我的xaml:
<UserControl x:Class="SilverlightApplication2.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="400">
<Grid x:Name="LayoutRoot" Background="White">
<TextBlock Text="Hello world"></TextBlock>
<PivotViewer/>
</Grid>
</UserControl>
添加了對程序集System.Windows.Controls.Pivot
的引用
<UserControl x:Class="SilverlightApplication2.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:pivot="clr-namespace:System.Windows.Controls.Pivot;assembly=System.Windows.Controls.Pivot"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="400">
<Grid x:Name="LayoutRoot" Background="White">
<TextBlock Text="Hello world"></TextBlock>
<pivot:PivotViewer x:Name="pViewer" />
</Grid>
</UserControl>
我在我的博客上有一個系列,通過使用PivotViewer。 這應該讓你開始。 http://tonychampion.net/blog/index.php/series/pivotviewer-basics/
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.