【发布时间】:2014-12-20 17:07:25
【问题描述】:
我正在尝试在我的项目中使用 Windows Toolkit 中的 longlistselector,但我总是遇到此错误。 我将命名空间添加到我的 xaml 并尝试重新启动 Visual Studio 几次。 当然,工具包是用nuget包管理器安装的。
编辑:我在 windows phone 8.1 上
这是 XAML 代码:
<Page
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:System="clr-namespace:System;assembly=System"
xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
mc:Ignorable="d">
<Grid Background="#00000000">
<Pivot Margin="0,81,0,0" Title="">
<PivotItem Header="Vidéos" Margin="19,0,19,-0.333">
<Grid Background="#00000000">
<phone:LongListSelector x:Name="VideosList" HorizontalAlignment="Left" Height="406" Margin="-1,43,0,-103" VerticalAlignment="Top" Width="363" ItemsSource="{Binding Videos}" SelectionChanged="PlayVideo" SelectionMode="Single" IsItemClickEnabled="False" Background="#00000000">
</phone:LongListSelector>
<TextBlock x:Name="Output" TextWrapping="Wrap" Margin="0,0,0,315" FontSize="36"/>
<Button Content="Clear Files" HorizontalAlignment="Left" Margin="10,415,0,0" VerticalAlignment="Top" Width="352" Click="Delete_File"/>
</Grid>
</PivotItem>
<PivotItem Header="Recherche" Foreground="White">
<Grid>
<Button VerticalAlignment="Top" Height="63" Width="33" HorizontalAlignment="Right" Content="Parcourir" Margin="0,18,130,0" Click="Button_Click"/>
</Grid>
</PivotItem>
</Pivot>
<TextBlock Height="92" TextWrapping="Wrap" VerticalAlignment="Top" Width="400" Text="EPIVIDEO" FontSize="32" TextAlignment="Center" FontFamily="Digital Desolation" Foreground="#FF00E8FF"/>
</Grid>
</Page>
谁能帮帮我?我不知道该怎么办?
【问题讨论】:
-
我为 WP8.1 WinRT 实现了 LongListSelector,因为那里缺少它,请参阅mytoolkit.codeplex.com/wikipage?title=LongListSelector
-
感谢您的链接,但 saravanan 发布的答案对我来说更好。
标签: xaml windows-phone-8 silverlight-toolkit