diff options
author | RinaYou <rina6350.you@samsung.com> | 2017-09-21 15:43:13 +0900 |
---|---|---|
committer | Kangho Hur <kangho.hur@samsung.com> | 2017-10-23 13:34:42 +0900 |
commit | 0226ce604ea3a60716173bd2f2241c224cc0ff31 (patch) | |
tree | 870788848687385fe4388c44b21488cfa0250fe5 /Xamarin.Forms.Platform.Tizen/Native/Page.cs | |
parent | abbd040185369542048ed2dd270047e0ddf540ee (diff) | |
download | xamarin-forms-0226ce604ea3a60716173bd2f2241c224cc0ff31.tar.gz xamarin-forms-0226ce604ea3a60716173bd2f2241c224cc0ff31.tar.bz2 xamarin-forms-0226ce604ea3a60716173bd2f2241c224cc0ff31.zip |
Change file name for changing Class name
Change-Id: I57774f642175c08294722292a4a6ac4b65ed7e3f
Diffstat (limited to 'Xamarin.Forms.Platform.Tizen/Native/Page.cs')
-rwxr-xr-x | Xamarin.Forms.Platform.Tizen/Native/Page.cs | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/Xamarin.Forms.Platform.Tizen/Native/Page.cs b/Xamarin.Forms.Platform.Tizen/Native/Page.cs new file mode 100755 index 00000000..0ade2f2b --- /dev/null +++ b/Xamarin.Forms.Platform.Tizen/Native/Page.cs @@ -0,0 +1,66 @@ +using System; +using System.Collections.Generic; +using ElmSharp; + +namespace Xamarin.Forms.Platform.Tizen.Native +{ + /// <summary> + /// A basic page which can hold a single view. + /// </summary> + public class Page : Background, IContainable<EvasObject> + { + /// <summary> + /// The name of the part to be used when setting content. + /// </summary> + public const string ContentPartName = "overlay"; + + /// <summary> + /// Exposes the Children property, mapping it to the _canvas' Children property. + /// </summary> + public IList<EvasObject> Children => _canvas.Children; + + /// <summary> + /// The canvas, used as a container for other objects. + /// </summary> + /// <remarks> + /// The canvas holds all the Views that the ContentPage is composed of. + /// </remarks> + internal Canvas _canvas; + + /// <summary> + /// Initializes a new instance of the ContentPage class. + /// </summary> + public Page(EvasObject parent) : base(parent) + { + _canvas = new Canvas(this); + SetPartContent(ContentPartName, _canvas); + } + + /// <summary> + /// Allows custom handling of events emitted when the layout has been updated. + /// </summary> + public event EventHandler<LayoutEventArgs> LayoutUpdated + { + add + { + _canvas.LayoutUpdated += value; + } + remove + { + _canvas.LayoutUpdated -= value; + } + } + + /// <summary> + /// Handles the disposing of a ContentPage + /// </summary> + /// <remarks> + /// Takes the proper care of discarding the canvas, then calls the base method. + /// </remarks> + protected override void OnUnrealize() + { + _canvas.Unrealize(); + base.OnUnrealize(); + } + } +} |