/* Based on Windows UI Library
Copyright(c) Microsoft Corporation.All rights reserved. */
using WPFluent.Abstractions;
using WPFluent.Animations;
using System.Collections;
using System.Windows.Controls;
// ReSharper disable once CheckNamespace
namespace WPFluent.Controls;
///
/// Represents a container that enables navigation of app content. It has a header, a view for the main content, and a
/// menu pane for navigation commands.
///
public interface INavigationView
{
///
/// Occurs when the back button receives an interaction such as a click or tap.
///
event TypedEventHandler BackRequested;
///
/// Occurs when an item in the menu receives an interaction such as a click or tap.
///
event TypedEventHandler ItemInvoked;
///
/// Occurs when navigated to page
///
event TypedEventHandler Navigated;
///
/// Occurs when a new navigation is requested
///
event TypedEventHandler Navigating;
///
/// Occurs when the NavigationView pane is closed.
///
event TypedEventHandler PaneClosed;
///
/// Occurs when the NavigationView pane is opened.
///
event TypedEventHandler PaneOpened;
///
/// Occurs when the currently selected item changes.
///
event TypedEventHandler SelectionChanged;
///
/// Clears the NavigationView history.
///
void ClearJournal();
///
/// Navigates the NavigationView to the previous journal entry.
///
/// if successfully navigated backward, otherwise .
bool GoBack();
///
/// Navigates the NavigationView to the next journal entry.
///
/// if successfully navigated forward, otherwise .
bool GoForward();
///
/// Synchronously navigates current navigation Frame to the given Element.
///
bool Navigate(Type pageType, object? dataContext = null);
///
/// Synchronously navigates current navigation Frame to the given Element.
///
bool Navigate(string pageIdOrTargetTag, object? dataContext = null);
///
/// Synchronously adds an element to the navigation stack and navigates current navigation Frame to the
///
bool NavigateWithHierarchy(Type pageType, object? dataContext = null);
///
/// Replaces the contents of the navigation frame, without changing the currently selected item or triggering an .
///
bool ReplaceContent(Type pageTypeToEmbed);
///
/// Replaces the contents of the navigation frame, without changing the currently selected item or triggering an .
///
bool ReplaceContent(UIElement pageInstanceToEmbed, object? dataContext = null);
///
/// Allows you to assign to the NavigationView a special service responsible for retrieving the page instances.
///
void SetPageProviderService(INavigationViewPageProvider navigationViewPageProvider);
///
/// Allows you to assign a general to the NavigationView that will be used to retrieve
/// page instances and view models.
///
void SetServiceProvider(IServiceProvider serviceProvider);
///
/// Gets or sets a value indicating whether the header is always visible.
///
bool AlwaysShowHeader { get; set; }
///
/// Gets or sets an AutoSuggestBox to be displayed in the NavigationView.
///
AutoSuggestBox? AutoSuggestBox { get; set; }
///
/// Gets or sets an BreadcrumbBar that is in .
///
Controls.BreadcrumbBar? BreadcrumbBar { get; set; }
///
/// Gets a value indicating whether there is at least one entry in back navigation history.
///
bool CanGoBack { get; }
///
/// Gets or sets the width of the NavigationView pane in its compact display mode.
///
double CompactPaneLength { get; set; }
///
/// Gets or sets a UI element that is shown at the top of the control, below the pane if PaneDisplayMode is Top.
///
object? ContentOverlay { get; set; }
///
/// Gets the list of objects to be used as navigation items in the footer menu.
///
IList FooterMenuItems { get; }
///
/// Gets or sets the object that represents the navigation items to be used in the footer menu.
///
object? FooterMenuItemsSource { get; set; }
///
/// Gets or sets margin for a Frame of
///
Thickness FrameMargin { get; set; }
///
/// Gets or sets the header content.
///
object? Header { get; set; }
///
/// Gets or sets the visibility.
///
Visibility HeaderVisibility { get; set; }
///
/// Gets or sets a value that indicates whether the back button is visible or not. Default value is "Auto", which
/// indicates that button visibility depends on the DisplayMode setting of the NavigationView.
///
NavigationViewBackButtonVisible IsBackButtonVisible { get; set; }
///
/// Gets a value indicating whether the back button is enabled or disabled.
///
bool IsBackEnabled { get; }
///
/// Gets or sets a value indicating whether the NavigationView pane is expanded to its full width.
///
bool IsPaneOpen { get; set; }
///
/// Gets or sets a value indicating whether the toggle button is visible.
///
bool IsPaneToggleVisible { get; set; }
///
/// Gets or sets a value indicating whether the pane is shown.
///
bool IsPaneVisible { get; set; }
///
/// Gets or sets the template property for and .
///
ControlTemplate? ItemTemplate { get; set; }
///
/// Gets the collection of menu items displayed in the NavigationView.
///
IList MenuItems { get; }
///
/// Gets or sets an object source used to generate the content of the NavigationView menu.
///
object? MenuItemsSource { get; set; }
///
/// Gets or sets the width of the NavigationView pane when it's fully expanded.
///
double OpenPaneLength { get; set; }
///
/// Gets or sets a value that specifies how the pane and content areas of a NavigationView are being shown. It is
/// not the same PaneDisplayMode as in WinUi.
///
NavigationViewPaneDisplayMode PaneDisplayMode { get; set; }
///
/// Gets or sets the content for the pane footer.
///
object? PaneFooter { get; set; }
///
/// Gets or sets the content for the pane header.
///
object? PaneHeader { get; set; }
///
/// Gets or sets the label adjacent to the menu icon when the NavigationView pane is open.
///
string? PaneTitle { get; set; }
///
/// Gets the selected item.
///
INavigationViewItem? SelectedItem { get; }
///
/// Gets or sets an TitleBar to be displayed in the NavigationView.
///
Controls.TitleBar? TitleBar { get; set; }
///
/// Gets or sets type of transitions during navigation.
///
Transition Transition { get; set; }
///
/// Gets or sets a value deciding how long the effect of the transition between the pages should take.
///
int TransitionDuration { get; set; }
}