默認情況下,.NET MAUI 將其彈出選單顯示為漢堡選單。有沒有辦法將其顯示為始終打開且不與內容重疊的常規側邊欄?
uj5u.com熱心網友回復:
在 Windows 上,你可以說
Shell.FlyoutBehavior="Locked"
不過,我不知道這在移動設備上有何作用。
uj5u.com熱心網友回復:
您可以將以下代碼放入您的代碼中AppShell.xaml,它會起作用。
<Shell.Resources>
<ResourceDictionary>
<Style x:Key="BaseStyle" TargetType="Element">
<Setter Property="Shell.FlyoutBehavior" Value="Locked"></Setter>
<Setter Property="Shell.FlyoutWidth" Value="55"></Setter>
</Style>
<Style TargetType="TabBar" BasedOn="{StaticResource BaseStyle}" />
<Style TargetType="FlyoutItem" BasedOn="{StaticResource BaseStyle}" />
</ResourceDictionary>
</Shell.Resources>
這是示例:

uj5u.com熱心網友回復:
@Slapout 答案是 wright ,請參閱檔案
https://learn.microsoft.com/en-us/dotnet/maui/fundamentals/shell/flyout#flyout-behavior
Locked – indicates that the flyout can't be closed by the user, and that it doesn't overlap content.
在您的 AppShell.xaml 中設定它
Shell.FlyoutBehavior="Locked"
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/512497.html
標籤:。网xml毛伊岛
下一篇:.netMaui系結值多個級別深
