gpt4 book ai didi

silverlight - “Is not recognized or is not accessible” 错误,创建表时

转载 作者:行者123 更新时间:2023-12-02 04:59:42 24 4
gpt4 key购买 nike

我一直在尝试像示例中那样做同一张表,但在 Windows Phone 中: http://www.scottlogic.com/blog/2010/11/15/using-a-grid-as-the-panel-for-an-itemscontrol.html

我已经下载了项目,并且复制了每个类:-GridItemsControl-GridUtils-PhantomPanel在此之后,我将此类的命名空间更改为“project.Tables”

比我在 xaml 页面中声明的要多xmlns:table="clr-namespace:project.Tables"

这样做之后一切都很好,除了有线的部分:

错误是:“无法识别或无法访问”您知道这个问题的解决方案吗?

这是来自 xaml 页面的示例代码:

 <ScrollViewer VerticalScrollBarVisibility="Auto">
<ItemsControl table:GridUtils.ItemsSource="{Binding}"
VerticalAlignment="Top">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<Grid table:GridUtils.ItemsPerRow="3">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
</Grid>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<table:PhantomPanel>
<TextBlock Text="{Binding Path=Item}"/>
<TextBlock Text="{Binding Path=Quantity}" Grid.Column="1"/>
<Line Stroke="LightGray" StrokeThickness="1"
VerticalAlignment="Bottom"
X1="0" X2="1" Y1="0" Y2="0"
Stretch="Fill"
Grid.ColumnSpan="2"/>
</table:PhantomPanel>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</ScrollViewer>

最佳答案

Zimas 您正在关注的链接主要用于 wpf 和 silverlight 应用程序,但您正在为 wp 尝试它很好,但可能存在一个问题,即此链接中使用的某些内容在 Windows Phone 中可能不受支持,因此请检查出那个。而且,如果想在 Windows Phone 中做这样的事情,请从头开始。不要直接复制代码..希望这对你有帮助..

关于silverlight - “Is not recognized or is not accessible” 错误,创建表时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17723156/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com