windows-phone-7 – ‘VisualTree’设置不止一次
发布时间:2020-12-13 20:18:29 所属栏目:Windows 来源:网络整理
导读:我在这个xaml文件中收到错误: The property ‘VisualTree’ is set more than once. ListBox x:Name="lstHistory" HorizontalAlignment="Left" Margin="12,284,90" Width="460" ItemsSource="{Binding Source={StaticResource SongCollection},Path=DataCol
我在这个xaml文件中收到错误:
<ListBox x:Name="lstHistory" HorizontalAlignment="Left" Margin="12,284,90" Width="460" ItemsSource="{Binding Source={StaticResource SongCollection},Path=DataCollection}"> <ListBox.ItemTemplate> <DataTemplate> <StackPanel Orientation="Horizontal"> <Image Margin="5" VerticalAlignment="top" Source="{Binding Path=Image}" /> </StackPanel> <TextBlock Margin="8" Width="250" TextWrapping="Wrap" VerticalAlignment="Top" HorizontalAlignment="Left" Text="{Binding Path=Name}" /> <TextBlock Width="100" Margin="8,8,8" VerticalAlignment="Top" HorizontalAlignment="Left" Text="{Binding Path=Artist}" /> </DataTemplate> </ListBox.ItemTemplate> </ListBox> 谁能帮忙?
DataTemplate只能有1个小孩.你有2(stackpanel和textblock).将其包装在单个容器中,一切都会很好
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- 定期的ServiceBus错误“当使用Azure WebSites时,X.509证书C
- window不卸载切换node
- 即使在添加到PATH之后,在Windows CMD中也无法识别python
- 没有共享硬件的Windows 2012 R2 Hyper-V群集
- windows-7 – 用于从多个文件夹中复制名为“dat”的文件的P
- windows – 如果长时间在大量DC上设置-strict,如何正确删除
- windows – 设置EXE VersionInfo
- 常用模块-configparser模块-配置文件格式
- windows-server-2012 – 具有不同cpu的Hyper-V集群
- assembly – 使用DOS或BIOS显示字符
推荐文章
站长推荐
- Microsoft是否有关于在不同Windows平台上存储App
- 如何收集每个服务名称及其在Windows中的状态?
- 在Windows中使用Makefile编译C源代码
- 无法在Windows上将memcached 1.4.5作为服务安装
- Qt5对WinXP系统的支持和兼容情况
- windows10远程桌面连接身份验证错误:函数不受支
- Windows – 没有密码的CreateProcessAsUser和Log
- windows-server-2008 – Microsoft Essential Bu
- windows – 如何传递nil代替const记录?
- windows – 使用Task Scheduler运行时,我的Power
热点阅读