Class Navigator

    Definition

    Namespace:
    Tizen.NUI.Components
    Assembly:
    Tizen.NUI.Components.dll

    The Navigator is a class which navigates pages with stack methods such as Push and Pop.

    public class Navigator : Control, INotifyPropertyChanged, IDisposable
    Inheritance
    object
    BindableObject
    Tizen.NUI.Binding.Element
    BaseHandle
    Animatable
    Container
    View
    ViewWrapper
    CustomView
    VisualView
    Tizen.NUI.Components.Control
    Navigator
    Implements
    System.ComponentModel.INotifyPropertyChanged
    System.IDisposable
    Remarks

    With Transition class, Navigator supports smooth transition of View pair between two Pages by using PushWithTransition(Page) and PopWithTransition() methods. If current top Page and next top Page have Views those have same TransitionTag, Navigator creates smooth transition motion for them. Navigator.Transition property can be used to set properties of the Transition such as TimePeriod and AlphaFunction. When all transitions are finished, Navigator calls a callback methods those connected on the "TransitionFinished" event.

    Examples
    Navigator navigator = new Navigator()
    {
        TimePeriod = new TimePeriod(500),
        AlphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.EaseInOutSine)
    };
    
    View view = new View()
    {
        TransitionOptions = new TransitionOptions()
        {
            /* Set properties for the transition of this View */
        }
    };
    
    ContentPage newPage = new ContentPage()
    {
        Content = view,
    };
    
    Navigator.PushWithTransition(newPage);

    Constructors

    View Source

    Navigator()

    Creates a new instance of a Navigator.

    Declaration
    public Navigator()
    Remarks

    With Transition class, Navigator supports smooth transition of View pair between two Pages by using PushWithTransition(Page) and PopWithTransition() methods. If current top Page and next top Page have Views those have same TransitionTag, Navigator creates smooth transition motion for them. Navigator.Transition property can be used to set properties of the Transition such as TimePeriod and AlphaFunction. When all transitions are finished, Navigator calls a callback methods those connected on the "TransitionFinished" event.

    Properties

    View Source

    PageCount

    Returns the count of pages in Navigator.

    Declaration
    public int PageCount { get; }
    Property Value
    Type Description
    int
    Remarks

    With Transition class, Navigator supports smooth transition of View pair between two Pages by using PushWithTransition(Page) and PopWithTransition() methods. If current top Page and next top Page have Views those have same TransitionTag, Navigator creates smooth transition motion for them. Navigator.Transition property can be used to set properties of the Transition such as TimePeriod and AlphaFunction. When all transitions are finished, Navigator calls a callback methods those connected on the "TransitionFinished" event.

    View Source

    Transition

    Transition properties for the transition of View pair having same transition tag.

    Declaration
    public Transition Transition { get; set; }
    Property Value
    Type Description
    Transition
    Remarks

    With Transition class, Navigator supports smooth transition of View pair between two Pages by using PushWithTransition(Page) and PopWithTransition() methods. If current top Page and next top Page have Views those have same TransitionTag, Navigator creates smooth transition motion for them. Navigator.Transition property can be used to set properties of the Transition such as TimePeriod and AlphaFunction. When all transitions are finished, Navigator calls a callback methods those connected on the "TransitionFinished" event.

    Methods

    View Source

    GetDefaultNavigator(Window)

    Returns the default navigator of the given window.

    Declaration
    public static Navigator GetDefaultNavigator(Window window)
    Parameters
    Type Name Description
    Window window
    Returns
    Type Description
    Navigator

    The default navigator of the given window.

    Remarks

    With Transition class, Navigator supports smooth transition of View pair between two Pages by using PushWithTransition(Page) and PopWithTransition() methods. If current top Page and next top Page have Views those have same TransitionTag, Navigator creates smooth transition motion for them. Navigator.Transition property can be used to set properties of the Transition such as TimePeriod and AlphaFunction. When all transitions are finished, Navigator calls a callback methods those connected on the "TransitionFinished" event.

    Exceptions
    Type Condition
    System.ArgumentNullException

    Thrown when the argument window is null.

    View Source

    GetPage(int)

    Returns the page of the given index in Navigator. The indices of pages in Navigator are basically the order of pushing or inserting to Navigator. So a page's index in Navigator can be changed whenever push/insert or pop/remove occurs.

    Declaration
    public Page GetPage(int index)
    Parameters
    Type Name Description
    int index

    The index of a page in Navigator.

    Returns
    Type Description
    Page

    The page of the given index in Navigator.

    Remarks

    With Transition class, Navigator supports smooth transition of View pair between two Pages by using PushWithTransition(Page) and PopWithTransition() methods. If current top Page and next top Page have Views those have same TransitionTag, Navigator creates smooth transition motion for them. Navigator.Transition property can be used to set properties of the Transition such as TimePeriod and AlphaFunction. When all transitions are finished, Navigator calls a callback methods those connected on the "TransitionFinished" event.

    Exceptions
    Type Condition
    System.ArgumentOutOfRangeException

    Thrown when the argument index is less than 0, or greater than the number of pages.

    View Source

    IndexOf(Page)

    Returns the current index of the given page in Navigator. The indices of pages in Navigator are basically the order of pushing or inserting to Navigator. So a page's index in Navigator can be changed whenever push/insert or pop/remove occurs.

    Declaration
    public int IndexOf(Page page)
    Parameters
    Type Name Description
    Page page

    The page in Navigator.

    Returns
    Type Description
    int

    The index of the given page in Navigator. If the given page is not in the Navigator, then -1 is returned.

    Remarks

    With Transition class, Navigator supports smooth transition of View pair between two Pages by using PushWithTransition(Page) and PopWithTransition() methods. If current top Page and next top Page have Views those have same TransitionTag, Navigator creates smooth transition motion for them. Navigator.Transition property can be used to set properties of the Transition such as TimePeriod and AlphaFunction. When all transitions are finished, Navigator calls a callback methods those connected on the "TransitionFinished" event.

    Exceptions
    Type Condition
    System.ArgumentNullException

    Thrown when the argument page is null.

    View Source

    Insert(int, Page)

    Inserts a page at the specified index of Navigator. The indices of pages in Navigator are basically the order of pushing or inserting to Navigator. So a page's index in Navigator can be changed whenever push/insert or pop/remove occurs. To find the current index of a page in Navigator, please use IndexOf(page). If the page is already in Navigator, then it is not inserted.

    Declaration
    public void Insert(int index, Page page)
    Parameters
    Type Name Description
    int index

    The index of a page in Navigator where the page will be inserted.

    Page page

    The page to insert to Navigator.

    Remarks

    With Transition class, Navigator supports smooth transition of View pair between two Pages by using PushWithTransition(Page) and PopWithTransition() methods. If current top Page and next top Page have Views those have same TransitionTag, Navigator creates smooth transition motion for them. Navigator.Transition property can be used to set properties of the Transition such as TimePeriod and AlphaFunction. When all transitions are finished, Navigator calls a callback methods those connected on the "TransitionFinished" event.

    Exceptions
    Type Condition
    System.ArgumentOutOfRangeException

    Thrown when the argument index is less than 0, or greater than the number of pages.

    System.ArgumentNullException

    Thrown when the argument page is null.

    View Source

    InsertBefore(Page, Page)

    Inserts a page to Navigator before an existing page. If the page is already in Navigator, then it is not inserted.

    Declaration
    public void InsertBefore(Page before, Page page)
    Parameters
    Type Name Description
    Page before

    The existing page, before which a page will be inserted.

    Page page

    The page to insert to Navigator.

    Remarks

    With Transition class, Navigator supports smooth transition of View pair between two Pages by using PushWithTransition(Page) and PopWithTransition() methods. If current top Page and next top Page have Views those have same TransitionTag, Navigator creates smooth transition motion for them. Navigator.Transition property can be used to set properties of the Transition such as TimePeriod and AlphaFunction. When all transitions are finished, Navigator calls a callback methods those connected on the "TransitionFinished" event.

    Exceptions
    Type Condition
    System.ArgumentNullException

    Thrown when the argument before is null.

    System.ArgumentNullException

    Thrown when the argument page is null.

    System.ArgumentException

    Thrown when the argument before does not exist in Navigator.

    View Source

    Peek()

    Returns the page at the top of Navigator.

    Declaration
    public Page Peek()
    Returns
    Type Description
    Page

    The page at the top of Navigator.

    Remarks

    With Transition class, Navigator supports smooth transition of View pair between two Pages by using PushWithTransition(Page) and PopWithTransition() methods. If current top Page and next top Page have Views those have same TransitionTag, Navigator creates smooth transition motion for them. Navigator.Transition property can be used to set properties of the Transition such as TimePeriod and AlphaFunction. When all transitions are finished, Navigator calls a callback methods those connected on the "TransitionFinished" event.

    View Source

    Pop()

    Pops the top page from Navigator.

    Declaration
    public Page Pop()
    Returns
    Type Description
    Page

    The popped page.

    Remarks

    With Transition class, Navigator supports smooth transition of View pair between two Pages by using PushWithTransition(Page) and PopWithTransition() methods. If current top Page and next top Page have Views those have same TransitionTag, Navigator creates smooth transition motion for them. Navigator.Transition property can be used to set properties of the Transition such as TimePeriod and AlphaFunction. When all transitions are finished, Navigator calls a callback methods those connected on the "TransitionFinished" event.

    Exceptions
    Type Condition
    System.InvalidOperationException

    Thrown when there is no page in Navigator.

    View Source

    PopWithTransition()

    Pops the top page from Navigator.

    Declaration
    public Page PopWithTransition()
    Returns
    Type Description
    Page

    The popped page.

    Remarks

    With Transition class, Navigator supports smooth transition of View pair between two Pages by using PushWithTransition(Page) and PopWithTransition() methods. If current top Page and next top Page have Views those have same TransitionTag, Navigator creates smooth transition motion for them. Navigator.Transition property can be used to set properties of the Transition such as TimePeriod and AlphaFunction. When all transitions are finished, Navigator calls a callback methods those connected on the "TransitionFinished" event.

    Exceptions
    Type Condition
    System.InvalidOperationException

    Thrown when there is no page in Navigator.

    View Source

    Push(Page)

    Pushes a page to Navigator. If the page is already in Navigator, then it is not pushed.

    Declaration
    public void Push(Page page)
    Parameters
    Type Name Description
    Page page

    The page to push to Navigator.

    Remarks

    With Transition class, Navigator supports smooth transition of View pair between two Pages by using PushWithTransition(Page) and PopWithTransition() methods. If current top Page and next top Page have Views those have same TransitionTag, Navigator creates smooth transition motion for them. Navigator.Transition property can be used to set properties of the Transition such as TimePeriod and AlphaFunction. When all transitions are finished, Navigator calls a callback methods those connected on the "TransitionFinished" event.

    Exceptions
    Type Condition
    System.ArgumentNullException

    Thrown when the argument page is null.

    View Source

    PushWithTransition(Page)

    Pushes a page to Navigator. If the page is already in Navigator, then it is not pushed.

    Declaration
    public void PushWithTransition(Page page)
    Parameters
    Type Name Description
    Page page

    The page to push to Navigator.

    Remarks

    With Transition class, Navigator supports smooth transition of View pair between two Pages by using PushWithTransition(Page) and PopWithTransition() methods. If current top Page and next top Page have Views those have same TransitionTag, Navigator creates smooth transition motion for them. Navigator.Transition property can be used to set properties of the Transition such as TimePeriod and AlphaFunction. When all transitions are finished, Navigator calls a callback methods those connected on the "TransitionFinished" event.

    Exceptions
    Type Condition
    System.ArgumentNullException

    Thrown when the argument page is null.

    View Source

    Remove(Page)

    Removes a page from Navigator.

    Declaration
    public void Remove(Page page)
    Parameters
    Type Name Description
    Page page

    The page to remove from Navigator.

    Remarks

    With Transition class, Navigator supports smooth transition of View pair between two Pages by using PushWithTransition(Page) and PopWithTransition() methods. If current top Page and next top Page have Views those have same TransitionTag, Navigator creates smooth transition motion for them. Navigator.Transition property can be used to set properties of the Transition such as TimePeriod and AlphaFunction. When all transitions are finished, Navigator calls a callback methods those connected on the "TransitionFinished" event.

    Exceptions
    Type Condition
    System.ArgumentNullException

    Thrown when the argument page is null.

    View Source

    RemoveAt(int)

    Removes a page at the specified index of Navigator. The indices of pages in Navigator are basically the order of pushing or inserting to Navigator. So a page's index in Navigator can be changed whenever push/insert or pop/remove occurs. To find the current index of a page in Navigator, please use IndexOf(page).

    Declaration
    public void RemoveAt(int index)
    Parameters
    Type Name Description
    int index

    The index of a page in Navigator where the page will be removed.

    Remarks

    With Transition class, Navigator supports smooth transition of View pair between two Pages by using PushWithTransition(Page) and PopWithTransition() methods. If current top Page and next top Page have Views those have same TransitionTag, Navigator creates smooth transition motion for them. Navigator.Transition property can be used to set properties of the Transition such as TimePeriod and AlphaFunction. When all transitions are finished, Navigator calls a callback methods those connected on the "TransitionFinished" event.

    Exceptions
    Type Condition
    System.ArgumentOutOfRangeException

    Thrown when the index is less than 0, or greater than or equal to the number of pages.

    Events

    View Source

    Popped

    An event fired when Pop of a page has been finished.

    Declaration
    public event EventHandler<PoppedEventArgs> Popped
    Event Type
    Type Description
    System.EventHandler<TEventArgs><PoppedEventArgs>
    Remarks

    When you free resources in the Popped event handler, please make sure if the popped page is the page you find.

    View Source

    TransitionFinished

    An event fired when Transition has been finished.

    Declaration
    public event EventHandler<EventArgs> TransitionFinished
    Event Type
    Type Description
    System.EventHandler<TEventArgs><System.EventArgs>
    Remarks

    With Transition class, Navigator supports smooth transition of View pair between two Pages by using PushWithTransition(Page) and PopWithTransition() methods. If current top Page and next top Page have Views those have same TransitionTag, Navigator creates smooth transition motion for them. Navigator.Transition property can be used to set properties of the Transition such as TimePeriod and AlphaFunction. When all transitions are finished, Navigator calls a callback methods those connected on the "TransitionFinished" event.

    Implements

    System.ComponentModel.INotifyPropertyChanged
    System.IDisposable
    • View Source
    Back to top Copyright © 2016-2024 Samsung
    Generated by DocFX