2 * Copyright(c) 2021 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.ComponentModel;
20 namespace Tizen.NUI.Components
23 /// PageAppearingEventArgs is a class to record <see cref="Page.Appearing"/> event arguments which will be sent to user.
25 /// <since_tizen> 9 </since_tizen>
26 public class PageAppearingEventArgs : EventArgs
31 /// PageDisappearingEventArgs is a class to record <see cref="Page.Disappearing"/> event arguments which will be sent to user.
33 /// <since_tizen> 9 </since_tizen>
34 public class PageDisappearingEventArgs : EventArgs
39 /// PageAppearedEventArgs is a class to record <see cref="Page.Appeared"/> event arguments which will be sent to user.
41 /// <since_tizen> 9 </since_tizen>
42 public class PageAppearedEventArgs : EventArgs
47 /// PageDisappearedEventArgs is a class to record <see cref="Page.Disappeared"/> event arguments which will be sent to user.
49 /// <since_tizen> 9 </since_tizen>
50 public class PageDisappearedEventArgs : EventArgs
55 /// The Page class is a class which is an element of navigation.
57 /// <since_tizen> 9 </since_tizen>
58 public abstract class Page : Control
60 private Navigator navigator = null;
62 // Default transition is Fade.
63 private TransitionBase appearingTransition = null;
65 private TransitionBase disappearingTransition = null;
68 /// Creates a new instance of a Page.
70 /// <since_tizen> 9 </since_tizen>
71 public Page() : base()
76 /// Navigator which has pushed the Page into its stack.
77 /// If this Page has not been pushed into any Navigator, then Navigator is null.
79 /// <since_tizen> 9 </since_tizen>
80 public Navigator Navigator
88 if (navigator == value)
98 /// Transition properties for the transition of Views in this page during this page is pushed to Navigator.
100 [EditorBrowsable(EditorBrowsableState.Never)]
101 public TransitionBase AppearingTransition
105 appearingTransition = value;
109 return appearingTransition;
114 /// Transition properties for the transition of Views in this page during this page is popped from Navigator.
116 [EditorBrowsable(EditorBrowsableState.Never)]
117 public TransitionBase DisappearingTransition
121 disappearingTransition = value;
125 return disappearingTransition;
130 /// Appearing event is invoked right before the page appears.
132 /// <since_tizen> 9 </since_tizen>
133 public event EventHandler<PageAppearingEventArgs> Appearing;
136 /// Disappearing event is invoked right before the page disappears.
138 /// <since_tizen> 9 </since_tizen>
139 public event EventHandler<PageDisappearingEventArgs> Disappearing;
142 /// Appeared event is invoked right after the page appears.
144 /// <since_tizen> 9 </since_tizen>
145 public event EventHandler<PageAppearedEventArgs> Appeared;
148 /// Disappeared event is invoked right after the page disappears.
150 /// <since_tizen> 9 </since_tizen>
151 public event EventHandler<PageDisappearedEventArgs> Disappeared;
153 internal void InvokeAppearing()
155 Appearing?.Invoke(this, new PageAppearingEventArgs());
158 internal void InvokeDisappearing()
160 Disappearing?.Invoke(this, new PageDisappearingEventArgs());
163 internal void InvokeAppeared()
165 Appeared?.Invoke(this, new PageAppearedEventArgs());
168 internal void InvokeDisappeared()
170 Disappeared?.Invoke(this, new PageDisappearedEventArgs());