0
我開始爲Microsoft Surface進行編程,並且遇到問題。在Scatterview中獲取ScatterviewItem的名稱並綁定
我使用scatterview
<s:ScatterView Name="MainScatterView" ContactLeave="MainScatterView_ContactLeave" ContactEnter="MainScatterView_ContactEnter">
<s:ScatterView.ItemTemplate>
<DataTemplate>
<Image Name="picture" Source="{Binding}"/>
</DataTemplate>
</s:ScatterView.ItemTemplate>
</s:ScatterView>
protected override void OnInitialized(EventArgs e)
{
base.OnInitialized(e);
try
{
MainScatterView.ItemsSource =
System.IO.Directory.GetFiles(@"C:\Surface_App_Dam\img\", "*.png");
}
catch (System.IO.DirectoryNotFoundException)
{
// Handle exception as needed.
}
}
我想獲得我已經與「ContactLeave =」 MainScatterView_ContactLeave」, 移動的項目的名字,但我不知道我怎麼能做到這一點。
你能幫助我嗎?
謝謝。