我在设计一个xaml页面,如果我不插入toolkit:TiltEffect.IsTiltEnabled =“True”我的页面有一个“无效的XAML”。 下面是完整的页面:toolkit:TiltEffect.IsTiltEnabled不起作用
<phone:PhoneApplicationPage
x:Class="SolLongListSelector_WinPhone8.Page1"
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:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="768"
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
SupportedOrientations="Portrait" Orientation="Portrait"
shell:SystemTray.IsVisible="True">
<!--LayoutRoot is the root grid where all page content is placed-->
<Grid x:Name="LayoutRoot" Background="Transparent">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<!--ContentPanel - place additional content here-->
<!-- Slide Show with Pivot Control -->
<controls:Pivot
Grid.Row="0"
Grid.Column="0"
Name="slide_show"
Margin="0,-100,0,0"
SelectionChanged="slide_show_SelectionChanged">
<!-- Pivot item template -->
<controls:Pivot.ItemTemplate>
<DataTemplate>
<Image Name="img"
CacheMode="BitmapCache"
Source="{Binding image}"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Stretch="Uniform"
toolkit:TiltEffect.IsTiltEnabled="True"
/>
</DataTemplate>
</controls:Pivot.ItemTemplate>
</controls:Pivot>
</Grid>
</phone:PhoneApplicationPage>
我想脱下TiltEffect.IsTiltEnabled但我不能!还保留它给了我一个错误: 错误10名称“TiltEffect”不存在于命名空间“clr-namespace:Microsoft.Phone.Controls;程序集= Microsoft.Phone.Controls.Toolkit”中。
任何想法? 谢谢
像埃里克说的,你可能忘了添加它作为参考。我有一步一步的说明,通过使用NuGet在这里:http://stackoverflow.com/questions/25703114/windows-phone-8-1-silverlight-and-xaml/25705317?noredirect=1#comment40560052_25705317 – 2014-09-23 00:35:36