List<string>
画像へのパスを入力するメソッドを呼び出すボタンがあります。生成されたすべての画像を表示するためにこのメソッドが呼び出されるたびに、Windows8アプリを更新しようとしています。現在、画像パスをにハードコーディングしているだけなのに、何も表示されません。List<string>
画像を表示するための私のXAMLコードは次のとおりです。
<ItemsControl ItemsSource="{Binding Path=test}" Grid.Column="1" Grid.Row="3" Grid.ColumnSpan="5"
HorizontalContentAlignment="Stretch">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Image Source="{Binding}" />
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
そしてXaml.csで:
public sealed partial class MainPage : TestApp.Common.LayoutAwarePage
{
public List<string> test = new List<string>();
public MainPage()
{
test.Add("C:\\Users\\user\\Pictures\\image.jpg");
this.InitializeComponent();
}
}
私は何を間違えましたか/ここで変更する必要がありますか?どうもありがとう :)。