示例#1
0
        /// <summary>
        /// Pushes a new item to the top of the naviframe stack and shows it.
        /// </summary>
        /// <param name="content">The main content object. The name of the content part is "elm.swallow.content".</param>
        /// <param name="title">The current item title. Null would be default.</param>
        /// <param name="style">The current item style name. Null would be default.</param>
        /// <returns>The created item, or null upon failure.</returns>
        /// <since_tizen> preview </since_tizen>
        public NaviItem Push(EvasObject content, string title, string style)
        {
            IntPtr   item     = Interop.Elementary.elm_naviframe_item_push(RealHandle, title, IntPtr.Zero, IntPtr.Zero, content.Handle, style);
            NaviItem naviItem = NaviItem.FromNativeHandle(item, content);

            _itemStack.Add(naviItem);
            naviItem.Popped += ItemPoppedHandler;
            return(naviItem);
        }
示例#2
0
        /// <summary>
        /// Inserts a new item into the naviframe after the item.
        /// </summary>
        /// <param name="after">The item for which a new item is inserted after.</param>
        /// <param name="content">The main content object. The name of the content part is "elm.swallow.content".</param>
        /// <param name="title">The current item title. Null would be default.</param>
        /// <param name="style">The current item style name. Null would be default.</param>
        /// <returns>The created item, or null upon failure.</returns>
        /// <since_tizen> preview </since_tizen>
        public NaviItem InsertAfter(NaviItem after, EvasObject content, string title, string style)
        {
            IntPtr   item     = Interop.Elementary.elm_naviframe_item_insert_after(RealHandle, after, title, IntPtr.Zero, IntPtr.Zero, content, null);
            NaviItem naviItem = NaviItem.FromNativeHandle(item, content);
            int      idx      = _itemStack.IndexOf(after);

            _itemStack.Insert(idx + 1, naviItem);
            naviItem.Popped += ItemPoppedHandler;
            return(naviItem);
        }
示例#3
0
        /// <summary>
        /// Inserts a new item into the naviframe before the item.
        /// </summary>
        /// <param name="before">The item for which a new item is inserted before.</param>
        /// <param name="content">The main content object. The name of the content part is "elm.swallow.content".</param>
        /// <param name="title">The current item title. Null would be default.</param>
        /// <param name="style">The current item style name. Null would be default.</param>
        /// <returns>The created item, or null upon failure.</returns>
        /// <since_tizen> preview </since_tizen>
        public NaviItem InsertBefore(NaviItem before, EvasObject content, string title, string style)
        {
            IntPtr   item     = Interop.Elementary.elm_naviframe_item_insert_before(RealHandle, before, title, IntPtr.Zero, IntPtr.Zero, content, null);
            NaviItem naviItem = NaviItem.FromNativeHandle(item, content, this);
            int      idx      = _itemStack.IndexOf(before);

            _itemStack.Insert(idx, naviItem);
            naviItem.Popped += ItemPoppedHandler;
            return(naviItem);
        }
示例#4
0
        void ItemPoppedHandler(object sender, EventArgs e)
        {
            NaviItem item = sender as NaviItem;

            if (item == null)
            {
                return;
            }
            _itemStack.Remove(item);
            Popped?.Invoke(this, new NaviframeEventArgs {
                Content = item.Content
            });
        }
示例#5
0
 /// <summary>
 /// Inserts a new item into the naviframe after the item.
 /// The style is null.
 /// </summary>
 /// <param name="after">The item which a new item is inserted after.</param>
 /// <param name="content">The main content object. The name of the content part is "elm.swallow.content".</param>
 /// <param name="title">The current item title. Null would be default.</param>
 /// <returns>The created item, or null upon failure.</returns>
 /// <since_tizen> preview </since_tizen>
 public NaviItem InsertAfter(NaviItem after, EvasObject content, string title)
 {
     return(InsertAfter(after, content, title, null));
 }
示例#6
0
 /// <summary>
 /// Inserts a new item into the naviframe after the item.
 /// The title is "" and the style is null.
 /// </summary>
 /// <param name="after">The item for which a new item is inserted after.</param>
 /// <param name="content">The main content object. The name of the content part is "elm.swallow.content".</param>
 /// <returns>The created item, or null upon failure.</returns>
 /// <since_tizen> preview </since_tizen>
 public NaviItem InsertAfter(NaviItem after, EvasObject content)
 {
     return(InsertAfter(after, content, ""));
 }
示例#7
0
 /// <summary>
 /// Inserts a new item into the naviframe before the item.
 /// The style is null.
 /// </summary>
 /// <param name="before">The item for which a new item is inserted before.</param>
 /// <param name="content">The main content object. The name of the content part is "elm.swallow.content".</param>
 /// <param name="title">The current item title. Null would be default.</param>
 /// <returns>The created item, or null upon failure.</returns>
 /// <since_tizen> preview </since_tizen>
 public NaviItem InsertBefore(NaviItem before, EvasObject content, string title)
 {
     return(InsertBefore(before, content, title, null));
 }
示例#8
0
 /// <summary>
 /// Inserts a new item into the naviframe before the item.
 /// The title is "" and the style is null.
 /// </summary>
 /// <param name="before">The item for which a new item is inserted before.</param>
 /// <param name="content">The main content object. The name of the content part is "elm.swallow.content".</param>
 /// <returns>The created item, or null upon failure.</returns>
 /// <since_tizen> preview </since_tizen>
 public NaviItem InsertBefore(NaviItem before, EvasObject content)
 {
     return(InsertBefore(before, content, ""));
 }