내 페이지에 피벗 항목이 몇 개 있으며 평가판 모드인지 여부에 따라 PivotItem 중 하나를 표시하거나 숨길 필요가 있습니다. XAML 또는 C#에서 직접 PivotItem의 가시성을 설정하면 실제 PivotItem 자체가 아닌 PivotItem 내에있는 항목 만 숨 깁니다. 이것을 어떻게 할 수 있습니까? 테스트에서개별 PivotItem의 가시성을 숨기는 방법
나는 다음과 같은
Page.xaml
<phone:PivotItem x:Name="PivotItem2" Visibility="Collapsed"
Header="2">
...
</<phone:PivotItem>
또는
Page.xaml.cs 모두를 시도했습니다
protected override void OnNavigatedTo(NavigationEventArgs e)
{
base.OnNavigatedTo(e);
//Check trial state and set PivotItem
if ((Application.Current as App).IsTrial)
{
PivotItem2.Visibility = Visibility.Collapsed;
}
else
{
PivotItem2.Visibility = Visibility.Visible;
}
}
PivotItem 삭제를 시도 했습니까? – Romasz
평가판 상태가 아닌데도 표시해야합니다. – Matthew
어쩌면 이렇게 할 수 있습니다. 전체 모드를 준비하십시오. 평가 모드 (예인 경우)가 pivotitem을 제거하면 Page 생성자에서 확인하십시오. – Romasz