我在一页上有两个枢轴项目,我想根据上一页按钮显示特定的枢轴项目。我有两个按钮,名为" contact“和" help ".I,当用户单击”联系人“按钮项目1首先显示时,当用户单击”帮助“项显示first.How时,需要这样做吗?
这是我的xaml
<Pivot x:Name="MyPivot">
<PivotItem x:Name="contact" >
<PivotItem.Header>
<TextBlock FontFamily="Assets/fonts/KBPlanetEarth.ttf#KBPlanetEarth" Foreground="Purple" Margin="0,20,0,0">Contact</TextBlock>
</PivotItem.Header>
<StackPanel>
<Image VerticalAlignment="Top" Width="250" Height="150" HorizontalAlignment="Left" Source="Assets/icons/logo.png"></Image>
<TextBlock Foreground="Black" FontFamily="Comic Sans MS" TextWrapping="Wrap" FontSize="20">Feel Free to contact for any errors,updates and for don't forget to review.</TextBlock>
<Button Click="Button_Click" Height="80" Width="180" Margin="0,10,0,0" FontFamily="Assets/fonts/Arista2.0.ttf#Arista 2.0" Background="#27aae0" FontSize="25" Content="Email" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" ></Button>
<Button Click="Button_Click_1" Height="80" Width="180" Margin="0,10,0,0" FontFamily="Assets/fonts/Arista2.0.ttf#Arista 2.0" Background="#27aae0" FontSize="25" Content="Facebook" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" ></Button>
<Button Click="Button_Click_2" Height="80" Width="180" Margin="0,10,0,0" FontFamily="Assets/fonts/Arista2.0.ttf#Arista 2.0" Background="#27aae0" FontSize="25" Content="Review" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" ></Button>
</StackPanel>
</PivotItem>
<PivotItem x:Name="helped" >
<PivotItem.Header>
<TextBlock FontFamily="Assets/fonts/KBPlanetEarth.ttf#KBPlanetEarth" Foreground="Purple" Margin="0,20,0,0">Help</TextBlock>
</PivotItem.Header>
<FlipView>
<FlipViewItem>
<Image Source="Assets/7.png"></Image>
</FlipViewItem>
<FlipViewItem>
<Image Source="Assets/15.png"></Image>
</FlipViewItem>
</FlipView>
</PivotItem>
</Pivot>发布于 2014-08-01 21:48:25
您可以通过更改MyPivot.SelectedIndex的值来更改显示的项。
https://stackoverflow.com/questions/25089100
复制相似问题