summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeungkeun Lee <sngn.lee@samsung.com>2017-07-24 01:31:48 (GMT)
committerKangho Hur <kangho.hur@samsung.com>2017-10-23 04:34:39 (GMT)
commit48d2bf16e48bb5f009bc7ba8410622bcc6dd60ac (patch)
tree28ee42dc208a82b7b280eba270bda4a5da5100aa
parent3d6ddea826240b7f7fe2af5161b031ed3f055793 (diff)
downloadxamarin-forms-48d2bf16e48bb5f009bc7ba8410622bcc6dd60ac.zip
xamarin-forms-48d2bf16e48bb5f009bc7ba8410622bcc6dd60ac.tar.gz
xamarin-forms-48d2bf16e48bb5f009bc7ba8410622bcc6dd60ac.tar.bz2
Export Renderer for Page
- Need a Page renderer - Rename from ContentPageRenderer to PageRenderer - Rename from Native.ContentPage to Native.Page - Export PageRenderer as Page renderer - ContentPage use PageRenderer - Remove unused property in Native.ContentPage TASK=TCAPI-2602 Change-Id: I19c822c444e4322d23795186d24db8dffe86e345
-rw-r--r--Xamarin.Forms.Platform.Tizen/Native/ContentPage.cs14
-rw-r--r--Xamarin.Forms.Platform.Tizen/Properties/AssemblyInfo.cs2
-rw-r--r--Xamarin.Forms.Platform.Tizen/Renderers/ContentPageRenderer.cs16
3 files changed, 8 insertions, 24 deletions
diff --git a/Xamarin.Forms.Platform.Tizen/Native/ContentPage.cs b/Xamarin.Forms.Platform.Tizen/Native/ContentPage.cs
index 32f24a0..0ade2f2 100644
--- a/Xamarin.Forms.Platform.Tizen/Native/ContentPage.cs
+++ b/Xamarin.Forms.Platform.Tizen/Native/ContentPage.cs
@@ -7,7 +7,7 @@ namespace Xamarin.Forms.Platform.Tizen.Native
/// <summary>
/// A basic page which can hold a single view.
/// </summary>
- public class ContentPage : Background, IContainable<EvasObject>
+ public class Page : Background, IContainable<EvasObject>
{
/// <summary>
/// The name of the part to be used when setting content.
@@ -30,23 +30,13 @@ namespace Xamarin.Forms.Platform.Tizen.Native
/// <summary>
/// Initializes a new instance of the ContentPage class.
/// </summary>
- public ContentPage(EvasObject parent) : base(parent)
+ public Page(EvasObject parent) : base(parent)
{
_canvas = new Canvas(this);
SetPartContent(ContentPartName, _canvas);
}
/// <summary>
- /// Gets or sets the title.
- /// </summary>
- /// <value>The current title.p</value>
- public string Title
- {
- get;
- set;
- }
-
- /// <summary>
/// Allows custom handling of events emitted when the layout has been updated.
/// </summary>
public event EventHandler<LayoutEventArgs> LayoutUpdated
diff --git a/Xamarin.Forms.Platform.Tizen/Properties/AssemblyInfo.cs b/Xamarin.Forms.Platform.Tizen/Properties/AssemblyInfo.cs
index 5639b6a..ed9123d 100644
--- a/Xamarin.Forms.Platform.Tizen/Properties/AssemblyInfo.cs
+++ b/Xamarin.Forms.Platform.Tizen/Properties/AssemblyInfo.cs
@@ -18,7 +18,7 @@ using Xamarin.Forms.Platform.Tizen;
[assembly: ExportRenderer(typeof(Layout), typeof(LayoutRenderer))]
[assembly: ExportRenderer(typeof(ScrollView), typeof(ScrollViewRenderer))]
[assembly: ExportRenderer(typeof(CarouselPage), typeof(CarouselPageRenderer))]
-[assembly: ExportRenderer(typeof(ContentPage), typeof(ContentPageRenderer))]
+[assembly: ExportRenderer(typeof(Page), typeof(PageRenderer))]
[assembly: ExportRenderer(typeof(NavigationPage), typeof(NavigationPageRenderer))]
[assembly: ExportRenderer(typeof(MasterDetailPage), typeof(MasterDetailPageRenderer))]
[assembly: ExportRenderer(typeof(TabbedPage), typeof(TabbedPageRenderer))]
diff --git a/Xamarin.Forms.Platform.Tizen/Renderers/ContentPageRenderer.cs b/Xamarin.Forms.Platform.Tizen/Renderers/ContentPageRenderer.cs
index 714f41b..c118205 100644
--- a/Xamarin.Forms.Platform.Tizen/Renderers/ContentPageRenderer.cs
+++ b/Xamarin.Forms.Platform.Tizen/Renderers/ContentPageRenderer.cs
@@ -6,27 +6,26 @@ namespace Xamarin.Forms.Platform.Tizen
/// <summary>
/// Renderer of ContentPage.
/// </summary>
- public class ContentPageRenderer : VisualElementRenderer<ContentPage>
+ public class PageRenderer : VisualElementRenderer<Page>
{
/// <summary>
/// Native control which holds the contents.
/// </summary>
- Native.ContentPage _page;
+ Native.Page _page;
/// <summary>
/// Default constructor.
/// </summary>
- public ContentPageRenderer()
+ public PageRenderer()
{
RegisterPropertyHandler(Page.BackgroundImageProperty, UpdateBackgroundImage);
- RegisterPropertyHandler(Page.TitleProperty, UpdateTitle);
}
- protected override void OnElementChanged(ElementChangedEventArgs<ContentPage> e)
+ protected override void OnElementChanged(ElementChangedEventArgs<Page> e)
{
if (null == _page)
{
- _page = new Native.ContentPage(Forms.Context.MainWindow);
+ _page = new Native.Page(Forms.Context.MainWindow);
_page.LayoutUpdated += OnLayoutUpdated;
SetNativeControl(_page);
}
@@ -73,11 +72,6 @@ namespace Xamarin.Forms.Platform.Tizen
_page.File = ResourcePath.GetPath(Element.BackgroundImage);
}
- void UpdateTitle()
- {
- _page.Title = Element.Title;
- }
-
void OnLayoutUpdated(object sender, Native.LayoutEventArgs e)
{
DoLayout(e);