1

我正在 windows phone 8 中编写应用程序并且遇到绑定问题。这是我的页面结构的 xaml 代码

<phone:Pivot Grid.Row="1" SelectedIndex="{Binding SelectedPivotElement, Mode=TwoWay}" x:Name="SymbolsPivot" Title="Symbols" ItemsSource="{Binding CategoriesWithSymbols}">
        <phone:Pivot.HeaderTemplate>
            <DataTemplate>
                <ContentControl Content="{Binding Name}"/>
            </DataTemplate>
        </phone:Pivot.HeaderTemplate>
        <phone:Pivot.ItemTemplate>
            <DataTemplate>
                <telerikData:RadJumpList x:Name="SymbolsControl"  ItemsSource="{Binding Path=Symbols}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" >
                    <telerikData:RadJumpList.GroupDescriptors>
                        <data:PropertyGroupDescriptor PropertyName="GroupName"
                              SortMode="Ascending" />
                    </telerikData:RadJumpList.GroupDescriptors>
                    <telerikPrimitives:RadDataBoundListBox.VirtualizationStrategyDefinition>
                        <telerikPrimitives:WrapVirtualizationStrategyDefinition Orientation="Horizontal"/>
                    </telerikPrimitives:RadDataBoundListBox.VirtualizationStrategyDefinition>
                    <telerikData:RadJumpList.GroupHeaderTemplate>
                        <DataTemplate>
                            <Grid Margin="0,-8,0,12" Width="480">
                                <TextBlock FontWeight="Bold" FontSize="{StaticResource PhoneFontSizeMedium}" Text="{Binding}" TextWrapping="Wrap"/>
                            </Grid>
                        </DataTemplate>
                    </telerikData:RadJumpList.GroupHeaderTemplate>

                    <telerikData:RadJumpList.ItemTemplate>
                        <DataTemplate>
                            <Grid Width="300">
                                <TextBlock Text="{Binding Symbol}"/>
                            </Grid>
                        </DataTemplate>
                    </telerikData:RadJumpList.ItemTemplate>
                </telerikData:RadJumpList>


            </DataTemplate>
        </phone:Pivot.ItemTemplate>
    </phone:Pivot>
    <i:Interaction.Triggers>
            <i:EventTrigger EventName="ItemTap" SourceName="SymbolsControl"  >
                <cmd:EventToCommand Command="{Binding TapCommand}"
                                        />
            </i:EventTrigger>
    </i:Interaction.Triggers>  

所以我有枢轴控制,在枢轴内部我有一个列表。现在的问题是应用程序将项目点击事件绑定到我的中继命令,但从未调用此事件/命令。如果我将列表移到枢轴之外,一切正常。如何解决这个问题?

4

0 回答 0