使用ReactiveTabbedPage在毛伊岛项目和UWP平台上,所选选项卡的名称出现两次,一个在选项卡部分,第二个在屏幕的右上角,如图片中的红色圆圈所示。

。是否有可能移除或隐藏第二个?谢谢
我希望能够隐藏或删除页右上角的标签名。
更新:示例代码MainPage.xaml:
<rxui:ReactiveTabbedPage
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:rxui="clr-namespace:ReactiveUI.Maui;assembly=ReactiveUI.Maui"
xmlns:vm="clr-namespace:MySpace.Maui.ViewModels"
x:DataType="vm:MainViewModel"
x:TypeArguments="vm:MainViewModel"
x:Class="MySpace.MainPage"
xmlns:local="clr-namespace:MySpace.Maui.Views"
Title="MainPage">
<local:Tab1Page x:Name="Page1" />
<local:CoGComputationPage x:Name="Page2" />
<local:OrderTab x:Name="Page3" />
</rxui:ReactiveTabbedPage>Tab1Page.xaml:
<rxui:ReactiveContentPage
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:rxui="clr-namespace:ReactiveUI.Maui;assembly=ReactiveUI.Maui"
xmlns:vm="clr-namespace:MySpace.Maui.ViewModels"
x:DataType="vm:FirstViewModel"
x:TypeArguments="vm:FirstViewModel"
x:Class="MySpace.Maui.Views.Tab1Page"
Title="">
<rxui:ReactiveContentPage.Content>
<ScrollView>
<VerticalStackLayout
Spacing="25"
Padding="30,0"
VerticalOptions="Center">
<Image
Source="dotnet_bot.png"
HeightRequest="200"
HorizontalOptions="Center" />
<Label
Text="Hello, World!"
FontSize="32"
HorizontalOptions="Center" />
<Label
Text="Welcome to .NET Multi-platform App UI"
FontSize="18"
HorizontalOptions="Center" />
<Button
x:Name="CounterBtn"
Text="Click me"
Clicked="OnCounterClicked"
HorizontalOptions="Center" />
</VerticalStackLayout>
</ScrollView>
</rxui:ReactiveContentPage.Content>
</rxui:ReactiveContentPage>Tab1Page.xaml.cs:
public partial class Tab1Page : ReactiveContentPage<FirstViewModel>
{
int count = 0;
public Tab1Page()
{
InitializeComponent();
Title = "Tab 1";
}
private void OnCounterClicked(object sender, EventArgs e)
{
count+= 10;
if (count == 1)
CounterBtn.Text = $"Clicked {count} time";
else
CounterBtn.Text = $"Clicked {count} times";
SemanticScreenReader.Announce(CounterBtn.Text);
}
}FirstViewModel实际上是一个空视图模型。
发布于 2022-10-03 12:48:55
经过一些调查后,解决方案可能是将HasNavigationBar属性设置为假为ReactiveContentPage xaml文件。因此,例如:
<rxui:ReactiveContentPage
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:rxui="clr-namespace:ReactiveUI.Maui;assembly=ReactiveUI.Maui"
xmlns:vm="clr-namespace:MySpace.Maui.ViewModels"
x:DataType="vm:FirstViewModel"
x:TypeArguments="vm:FirstViewModel"
x:Class="MySpace.Maui.Views.Tab1Page"
NavigationPage.HasNavigationBar="False"
Title="">
<rxui:ReactiveContentPage.Content>
"Here your stuff"
</rxui:ReactiveContentPage.Content>
</rxui:ReactiveContentPage>https://stackoverflow.com/questions/73663628
复制相似问题