/// <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); }
/// <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); }
/// <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); }