3

私は例のように同じテーブルを実行しようとしましたが、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>
4

1 に答える 1

0

あなたがフォローしているリンクは主に wpf と Silverlight アプリケーション用ですが、wp で試しているのは良いことですが、このリンクで使用されているものは Windows Phone でサポートされていない可能性があるという問題があるかもしれません。また、Windows phone でこのようなことをしたい場合は、ゼロから始めてください。コードを直接コピーしないでください..これがあなたに役立つことを願っています..

于 2013-07-18T13:54:23.350 に答える