2012-04-11 38 views

回答

1

數據透視項目的重點在於克服放置在數據透視項目內的任何控件。

<controls:PivotItem Header="item1"> 
       <i:Interaction.Triggers> 
        <i:EventTrigger EventName="GotFocus"> 
         <i:InvokeCommandAction Command="{Binding ShowMessageCommand}" /> 
        </i:EventTrigger> 
       </i:Interaction.Triggers> 
       <Grid> 
        <TextBox Height="100" 
          Width="200"/> 
        <Button Height="100" 
          Width="200" /> 
       </Grid> 
      </controls:PivotItem> 

此代碼適用於我。點擊按鈕或文本框時,數據透視項目會集中注意力。 希望這可以幫助你。

+0

,這是工作,但我必須點擊透視Cotrol內部有什麼直接點擊Pivot Control的Header或者我們可以使用鼠標移動旋轉控制,然後它會被觸發。謝謝。! – 2012-04-21 11:57:56

+0

你的要求是什麼? – TutuGeorge 2012-04-22 07:22:16

0

是,

給你的解決方案:

<controls:Pivot Title="My Pivot"> 
<i:Interaction.Triggers> 
    <i:EventTrigger EventName="SelectionChanged"> 
     <i:InvokeCommandAction Command="{Binding EuropePivotSelectedCommand}" /> 
    </i:EventTrigger> 
</i:Interaction.Triggers> 

<controls:PivotItem Header="item1"> 
</controls:PivotItem> 

<controls:PivotItem Header="item2"> 
</controls:PivotItem> 

問候 Juanlu,ElGuerre

相關問題