我有3个基于权限的标签。
此权限基于用户级别。
如果用户具有更高级别,则他或她可以访问3个选项卡(这意味着他或她可以单击所有选项卡)
问题:
如何以编程方式设置tab3,比如说用户无权访问Tab3,是否变暗或无法删除?
<TabbedPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="myApp.View.MainPage2">
<ContentPage Title ="Tab1" Icon="itemIcon1" WidthRequest="200" BackgroundColor="White">
<ContentPage.Content>
<StackLayout VerticalOptions="Center" HorizontalOptions="Center">
<Label Text="Welcome, Test1"> </Label>
</StackLayout>
</ContentPage.Content>
</ContentPage>
<ContentPage Title ="Tab2" Icon="itemIcon2" WidthRequest="200" BackgroundColor="White">
<ContentPage.Content>
<StackLayout VerticalOptions="Center" HorizontalOptions="Center">
<Label Text="Welcome, Test2"> </Label>
</StackLayout>
</ContentPage.Content>
</ContentPage>
<ContentPage Title ="Tab3" Icon="itemIcon3" WidthRequest="200">
<ContentPage.Content>
<StackLayout VerticalOptions="Center" HorizontalOptions="Center">
<Label Text="Welcome, Test3"> </Label>
</StackLayout>
</ContentPage.Content>
</ContentPage>
</TabbedPage>
由于