Grid에 Tab 이벤트가 잘 안먹는다고?

.Net/Windows Phone 2011.12.18 22:43


Grid에 Tab이벤트가 안먹는다... 왜 안먹을까?
근데 Grid 밑의 자식 엘리먼트를 탭하면 Grid의 Tab이벤트가 먹는다...

팁!!

Grid의 Background를 설정하면 Tab이벤트가 먹는다!
<Grid Tap="listBoxCurrentPlaybackItem_Tap" Background="Transparent" Margin="0,0,5,0">
요로케!~




<ListBox Grid.Row="1" Name="listBoxCurrentPlayback" Margin="0,20" Height="450" ItemsSource="{Binding CurrentPlaybackItems}">
      <ListBox.ItemTemplate>
       <DataTemplate>
        <Grid Tap="listBoxCurrentPlaybackItem_Tap" Background="Transparent" Margin="0,0,5,0">
         <toolkit:ContextMenuService.ContextMenu>
          <toolkit:ContextMenu>
           <!--<toolkit:MenuItem Header="Download" />-->
           <toolkit:MenuItem Header="Delete" Click="listBoxCurrentPlaybackItemContextMenuDelete_Click" />
          </toolkit:ContextMenu>
         </toolkit:ContextMenuService.ContextMenu>
         <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto" />
          <ColumnDefinition Width="*" />
         </Grid.ColumnDefinitions>

         <Image Grid.Column="0" x:Name="icon" Width="40" Height="40" Source="/MyMusic;component/Resources/MusicIcon.png" />
         <StackPanel Grid.Column="1">
          <StackPanel Orientation="Horizontal">
           <TextBlock  Text="{Binding Title}" Style="{StaticResource MusicTitleStyle}" />
           <TextBlock  Text="-" Style="{StaticResource MusicTitleStyle}" />
           <TextBlock  Text="{Binding Album}" Style="{StaticResource MusicTitleStyle}" />
          </StackPanel>
          <StackPanel Height="30" Orientation="Horizontal">
           <TextBlock Text="{Binding Artist}" Width="280" Style="{StaticResource MusicInfoStyle}" HorizontalAlignment="Left" />
           <TextBlock Text="{Binding Duration}" Style="{StaticResource MusicInfoStyle}" HorizontalAlignment="Right" />
          </StackPanel>
         </StackPanel>
        </Grid>
       </DataTemplate>
      </ListBox.ItemTemplate>
     </ListBox>

설정

트랙백

댓글

Windows Phone 7 Resources

.Net/Windows Phone 2011.12.15 22:17
윈폰 관련한 툴, 책, 아티클, 라이브러리, 팁 등 정리된 페이지.

잘 정리해두신듯..
그나저나 이거 다볼려면 몇일이나 걸릴려나 ㅠㅠ

- ChildWindow 관련 검색을 하다가..


설정

트랙백

댓글