summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKangho Hur <kangho.hur@samsung.com>2017-03-22 08:09:47 (GMT)
committerKangho Hur <kangho.hur@samsung.com>2017-03-24 04:19:03 (GMT)
commita4dcdffb33f9b2a7a0bb864f7c59dc08f61792b2 (patch)
tree4c14755381c56167577033cfa9a85b2206f55d68
parentab59d0f5b8e3e9a3488ed429c5a8f4bb904afbff (diff)
downloadxamarin-forms-a4dcdffb33f9b2a7a0bb864f7c59dc08f61792b2.zip
xamarin-forms-a4dcdffb33f9b2a7a0bb864f7c59dc08f61792b2.tar.gz
xamarin-forms-a4dcdffb33f9b2a7a0bb864f7c59dc08f61792b2.tar.bz2
Support window transparency
- Should make window transparent before invoke LoadApplication() - According to the Tizen UX Guideline, naviframe (NavigationPage in Xamarin.Forms) has its own opaque background image by default. - So, it always looks opaque even if window is transparent. - To avoid these situations, DO NOT use NavigationPage and Navigation.PushModalAsync() if you want to make your application translucent. Change-Id: I202bd1c500e6932f2fc49c9c5c88e06acb0659af
-rw-r--r--Xamarin.Forms.Platform.Tizen/Platform.cs9
-rw-r--r--Xamarin.Forms.Platform.Tizen/Xamarin.Forms.Platform.Tizen.project.json2
2 files changed, 10 insertions, 1 deletions
diff --git a/Xamarin.Forms.Platform.Tizen/Platform.cs b/Xamarin.Forms.Platform.Tizen/Platform.cs
index 69a435e..4fe56e3 100644
--- a/Xamarin.Forms.Platform.Tizen/Platform.cs
+++ b/Xamarin.Forms.Platform.Tizen/Platform.cs
@@ -135,6 +135,15 @@ namespace Xamarin.Forms.Platform.Tizen
IVisualElementRenderer pageRenderer = AttachRenderer(Page);
var naviItem = _naviframe.Push(pageRenderer.NativeView);
naviItem.TitleBarVisible = false;
+
+ // Make naviitem transparent if Forms.Context.MainWindow is transparent.
+ // Make sure that this is only for _navModel._naviTree. (not for _navModel._modalStack)
+ // In addtion, the style of naviItem is only decided before the naviItem pushed into Naviframe. (not on-demand).
+ if(Forms.Context.MainWindow.Alpha)
+ {
+ naviItem.Style = "default/transparent";
+ }
+
((Application)Page.RealParent).NavigationProxy.Inner = this;
Device.StartTimer(TimeSpan.Zero, () =>
diff --git a/Xamarin.Forms.Platform.Tizen/Xamarin.Forms.Platform.Tizen.project.json b/Xamarin.Forms.Platform.Tizen/Xamarin.Forms.Platform.Tizen.project.json
index 154c271..9c281cb 100644
--- a/Xamarin.Forms.Platform.Tizen/Xamarin.Forms.Platform.Tizen.project.json
+++ b/Xamarin.Forms.Platform.Tizen/Xamarin.Forms.Platform.Tizen.project.json
@@ -1,6 +1,6 @@
{
"dependencies": {
- "ElmSharp": "1.1.0-beta-011",
+ "ElmSharp": "1.1.0-beta-016",
"NETStandard.Library": "1.6.0",
"System.Runtime.Serialization.Xml": "4.1.1",
"Tizen.Applications": "1.1.0",