diff --git a/src/AvaloniaInside.Shell/Page.cs b/src/AvaloniaInside.Shell/Page.cs
index ff3523c..682f3d9 100644
--- a/src/AvaloniaInside.Shell/Page.cs
+++ b/src/AvaloniaInside.Shell/Page.cs
@@ -11,6 +11,7 @@
namespace AvaloniaInside.Shell;
[PseudoClasses(":modal")]
+[TemplatePart("PART_TabStripPlaceHolder", typeof(ContentPresenter))]
public class Page : UserControl, INavigationLifecycle, INavigatorLifecycle, INavigationBarProvider
{
private ContentPresenter? _navigationBarPlaceHolder;
@@ -344,6 +345,9 @@ private void ApplyNavigationBar()
if (Shell?.NavigationBarAttachType is not ({ } type and not NavigationBarAttachType.ToShell))
return;
+ if (IsModal && !Shell.NavigationBarForModal)
+ return;
+
if ((type == NavigationBarAttachType.ToLastPage && Chain is HostNavigationChain) ||
(type == NavigationBarAttachType.ToFirstHostThenPage && Chain.Back is HostNavigationChain))
return;
diff --git a/src/AvaloniaInside.Shell/ShellView.cs b/src/AvaloniaInside.Shell/ShellView.cs
index 4589c25..3fa6aee 100644
--- a/src/AvaloniaInside.Shell/ShellView.cs
+++ b/src/AvaloniaInside.Shell/ShellView.cs
@@ -169,6 +169,27 @@ public NavigationBarAttachType NavigationBarAttachType
#endregion
+ #region NavigationBarForModal
+
+ ///
+ /// Defines the property.
+ ///
+ public static readonly StyledProperty NavigationBarForModalProperty =
+ AvaloniaProperty.Register(
+ nameof(NavigationBarForModal),
+ defaultValue: false);
+
+ ///
+ /// Gets or sets the type of attach navigation bar.
+ ///
+ public bool NavigationBarForModal
+ {
+ get => GetValue(NavigationBarForModalProperty);
+ set => SetValue(NavigationBarForModalProperty, value);
+ }
+
+ #endregion
+
#endregion
#region Safe area properties