C# 如何在windows phone 8.1中显示特定的透视项目
我在一个页面上有两个数据透视项,我想基于上一个页面按钮显示特定的数据透视项。我有两个名为“联系人”和“帮助”的按钮。我想当用户单击联系人按钮时,项目1首先显示,当用户单击帮助项目时,首先显示。如何做到这一点 这是我的xamlC# 如何在windows phone 8.1中显示特定的透视项目,c#,xaml,windows-phone-8.1,C#,Xaml,Windows Phone 8.1,我在一个页面上有两个数据透视项,我想基于上一个页面按钮显示特定的数据透视项。我有两个名为“联系人”和“帮助”的按钮。我想当用户单击联系人按钮时,项目1首先显示,当用户单击帮助项目时,首先显示。如何做到这一点 这是我的xaml <Pivot x:Name="MyPivot"> <PivotItem x:Name="contact" > <PivotItem.Header>
<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>
接触
如有任何错误、更新,请随时联系,不要忘了查看。
帮助
您可以通过更改MyPivot.SelectedIndex的值来更改显示的项目