From 16de770486a86d0e928613446c2a3bc2800f507e Mon Sep 17 00:00:00 2001 From: Kangho Hur Date: Thu, 11 Mar 2021 16:11:13 +0900 Subject: [PATCH] [CommonUI] Added the ShadowFrame --- sample/Sample.Tizen/Sample.Tizen.cs | 16 +- sample/Sample/MainPageModel.cs | 5 + sample/Sample/Sample.csproj | 5 +- .../Sample/ShadowFrame/ShadowFrameTest.xaml | 100 ++++++ .../ShadowFrame/ShadowFrameTest.xaml.cs | 68 ++++ .../Renderer/ShadowFrameRenderer.cs | 330 ++++++++++++++++++ src/Tizen.Theme.Common/ShadowFrame.cs | 125 +++++++ 7 files changed, 642 insertions(+), 7 deletions(-) create mode 100644 sample/Sample/ShadowFrame/ShadowFrameTest.xaml create mode 100644 sample/Sample/ShadowFrame/ShadowFrameTest.xaml.cs create mode 100644 src/Tizen.Theme.Common/Renderer/ShadowFrameRenderer.cs create mode 100644 src/Tizen.Theme.Common/ShadowFrame.cs diff --git a/sample/Sample.Tizen/Sample.Tizen.cs b/sample/Sample.Tizen/Sample.Tizen.cs index 2fdac47..03bf2df 100644 --- a/sample/Sample.Tizen/Sample.Tizen.cs +++ b/sample/Sample.Tizen/Sample.Tizen.cs @@ -30,15 +30,19 @@ static void Main(string[] args) var option = new InitializationOptions(app) { //Using DP without device scaling mode - DisplayResolutionUnit = DisplayResolutionUnit.DP() + DisplayResolutionUnit = DisplayResolutionUnit.DP(), + UseSkiaSharp = true }; Forms.Init(option); - - // UIControls.Init() should be called after Forms.Init() - UIControls.Init(new InitOptions(app)); - CommonUI.Init(app); - if (Device.Idiom != TargetIdiom.TV) + if (Device.Idiom == TargetIdiom.TV) + { + // UIControls.Init() should be called after Forms.Init() + UIControls.Init(new InitOptions(app)); + CommonUI.Init(app); + } + else { + CommonUI.Init(app); CommonUI.AddCommonThemeOverlay(); } app.Run(args); diff --git a/sample/Sample/MainPageModel.cs b/sample/Sample/MainPageModel.cs index 32bdbcb..0c671ef 100644 --- a/sample/Sample/MainPageModel.cs +++ b/sample/Sample/MainPageModel.cs @@ -33,6 +33,11 @@ public MainPageModel() { TestCategories = new List { + new TestCategory + { + Name = "Shadow Frame Test", + PageType = typeof(ShadowFrame.ShadowFrameTest), + }, new TestCategory { Name = "Page Transition Test", diff --git a/sample/Sample/Sample.csproj b/sample/Sample/Sample.csproj index a9d3e56..0b83948 100644 --- a/sample/Sample/Sample.csproj +++ b/sample/Sample/Sample.csproj @@ -6,7 +6,7 @@ - + @@ -40,6 +40,9 @@ TestFlyoutPage.xaml + + ShadowFrameTest.xaml + diff --git a/sample/Sample/ShadowFrame/ShadowFrameTest.xaml b/sample/Sample/ShadowFrame/ShadowFrameTest.xaml new file mode 100644 index 0000000..c1f8ed2 --- /dev/null +++ b/sample/Sample/ShadowFrame/ShadowFrameTest.xaml @@ -0,0 +1,100 @@ + + + + + + +