1
Windows Phone 응용 프로그램을 개발 중입니다.DataTemplate 안에 사용자 지정 컨트롤 템플릿이있는 ListBox.ItemTemplate
<ListBox Margin="10,10,8,8" x:Name="ChoicesList">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel />
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.ItemTemplate>
<DataTemplate>
<Grid x:Name="ListBoxItemLayout" Background="Transparent" Margin="10">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.281*"/>
<ColumnDefinition Width="0.719*"/>
</Grid.ColumnDefinitions>
<Image Source="{Binding ImagePath}" Height="100"/>
<StackPanel Margin="5,0,0,0" Grid.Column="1">
<TextBlock x:Name="Name" TextWrapping="Wrap" Text="{Binding Name}" Style="{StaticResource PhoneTextTitle3Style}"/>
<TextBlock x:Name="Description" Margin="0,5,0,0" TextWrapping="Wrap" Text="{Binding Description}" d:LayoutOverrides="Width" Style="{StaticResource PhoneTextSmallStyle}"/>
<TextBlock x:Name="Rating" TextWrapping="Wrap" Text="{Binding Rating}" />
</StackPanel>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
은 내가 그것에 클릭 이벤트를 추가 할 수 있기 때문에 컨트롤로 ListBoxItem의 내부의 모든 컨텐츠를 변환 할 다음과 같이 나는 ListBox.ItemTemplate의 DataTemplate을 정의했다.
어떻게하면됩니까?
감사합니다.
ListBoxItemLayout Grid에서 'MouseLeftButtonUp'을 사용할 수없는 이유가 있습니까? – Stephan
예 : 저는 실버 라이트 개발에 대해 아주 새로운 것 같습니다. – VansFannel
솔루션 (유일한 솔루션은 아님)은 다음에서 찾을 수 있습니다. http://social.msdn.microsoft.com/Forums/en-US/windowsphone7series/thread/bffb1cfc-cd2d-4af6-a306-32972ed3874d – VansFannel