2 * Copyright(c) 2020 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 using System.Collections.Generic;
19 using System.ComponentModel;
20 using Tizen.NUI.BaseComponents;
21 using Tizen.NUI.Binding;
22 using System.Windows.Input;
24 namespace Tizen.NUI.Components
27 /// PageAppearingEventArgs is a class to record page appearing event arguments which will be sent to user.
29 [EditorBrowsable(EditorBrowsableState.Never)]
30 public class PageAppearingEventArgs : EventArgs
35 /// PageDisappearingEventArgs is a class to record page disappearing event arguments which will be sent to user.
37 [EditorBrowsable(EditorBrowsableState.Never)]
38 public class PageDisappearingEventArgs : EventArgs
43 /// The Page class is a class which is an element of navigation.
45 [EditorBrowsable(EditorBrowsableState.Never)]
46 public class Page : Control
48 private View _content = null;
51 /// Creates a new instance of a Page.
53 /// <param name="content">The content to set to Content of Page.</param>
54 [EditorBrowsable(EditorBrowsableState.Never)]
55 public Page(View content = null) : base()
57 //Page fills to parent by default.
58 WidthResizePolicy = ResizePolicyType.FillToParent;
59 HeightResizePolicy = ResizePolicyType.FillToParent;
68 /// Content of Page. Content is added to Children automatically.
70 [EditorBrowsable(EditorBrowsableState.Never)]
81 if (_content != value)
97 /// An event for the page appearing signal which can be used to subscribe or unsubscribe the event handler provided by the user.
99 [EditorBrowsable(EditorBrowsableState.Never)]
100 public event EventHandler<PageAppearingEventArgs> Appearing;
103 /// An event for the page disappearing signal which can be used to subscribe or unsubscribe the event handler provided by the user.
105 [EditorBrowsable(EditorBrowsableState.Never)]
106 public event EventHandler<PageDisappearingEventArgs> Disappearing;
108 internal void InvokeAppearing()
110 Appearing?.Invoke(this, new PageAppearingEventArgs());
113 internal void InvokeDisappearing()
115 Disappearing?.Invoke(this, new PageDisappearingEventArgs());