ListBox 내에있는 두 개의 열로 이루어진 Grid를 수행하고 있습니다. 그 후에는 DataBind를 사용하여 두 열을 세로로 반복 할 수 있습니다.Grid가있는 ListBox가있는 데이터가 없습니다
지금까지 아래 코드는 WP7 에뮬레이터에는 아무 것도 표시하지 않았습니다.
<ListBox Background="Yellow" ItemsSource="{Binding}" Height="100" Margin="0,0,8,0">
<ListBox.ItemTemplate>
<DataTemplate>
<Grid Height="100">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="200" />
<ColumnDefinition Width="200" />
</Grid.ColumnDefinitions>
<TextBlock Text="Channels" HorizontalAlignment="Stretch" Foreground="Black" Grid.Column="0" />
<TextBlock Text="Antenna" HorizontalAlignment="Stretch" Foreground="Black" Grid.Column="1"/>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
도와주세요. 당신의 유일한 관심사는 당신이 행동에 ItemTemplate을 볼 것입니다 경우 다음과 같이
어떻게 ItemsSource를 설정하고 있습니까? 편집 : 전체 DataContext는 Itemssource입니까? –
아직 항목 소스가 없으므로 수정 한 후에 설정하겠습니다. – darking050
표시 할 항목이있을 때까지 아무 것도 표시되지 않습니다. –