public class BasePageLayout : View
{
private View content;
+ private View dimView;
/// <summary>
/// Constructs new BasePageLayout object
public BasePageLayout()
: base()
{
- Layout = new AbsoluteLayout();
+ dimView = new View()
+ {
+ HeightResizePolicy = ResizePolicyType.FillToParent,
+ WidthResizePolicy = ResizePolicyType.FillToParent,
+ };
+
+ dimView.Layout = new AbsoluteLayout();
Title = new TextLabel
{
PositionUsesPivotPoint = true,
FontFamily = "BreezeSans",
FontStyle = new PropertyMap().AddLightFontStyle(),
};
- Add(Title);
+ dimView.Add(Title);
+ BackgroundImage = NUIApplication.Current.DirectoryInfo.Resource + "page/0_BG_WHITEsmall.png";
+ Add(dimView);
}
/// <summary>
{
if (content != null)
{
- Remove(content);
+ dimView.Remove(content);
}
content?.Dispose();
content.PositionUsesPivotPoint = true;
content.PivotPoint = new Position(0.5f, 0.5f);
content.ParentOrigin = new Position(0.5f, 0.5f);
- Add(content);
+ dimView.Add(content);
}
}
}
{
FinishDimAnimation();
- var newView = new Views.Page();
- newView.HeightResizePolicy = ResizePolicyType.FillToParent;
- newView.WidthResizePolicy = ResizePolicyType.FillToParent;
- newView.Content = view;
+ view.HeightResizePolicy = ResizePolicyType.FillToParent;
+ view.WidthResizePolicy = ResizePolicyType.FillToParent;
- if (stack.Current is Views.Page overlayedView)
+ if (stack.Current is View overlayedView)
{
StartDimAnimation(overlayedView);
}
pagination.SelectedIndex = pagination.SelectedIndex + 1;
- stack.Push(newView);
+ stack.Push(view);
}
public void Pop()
{
FinishDimAnimation();
- if (stack.Previous is Views.Page previous)
+ if (stack.Previous is View previous)
{
StartUndimAnimation(previous);
}
pagination.Dispose();
}
- private void StartDimAnimation(Views.Page view)
+ private void StartDimAnimation(View view)
{
view.Opacity = 1.0f;
dimEffectAnimation.AnimateTo(view, "Opacity", 0.0f);
dimEffectAnimation.Play();
}
- private void StartUndimAnimation(Views.Page view)
+ private void StartUndimAnimation(View view)
{
view.Opacity = 0.0f;
dimEffectAnimation.AnimateTo(view, "Opacity", 1.0f);
+++ /dev/null
-/*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using Tizen.NUI;
-using Tizen.NUI.BaseComponents;
-using Tizen.NUI.Components;
-
-namespace Oobe.Views
-{
- /// <summary>
- /// Implementation of OOBE GUI guideline for Tizen IoT headed
- /// </summary>
- public class Page : View
- {
- private View content;
-
- public Page()
- {
- BackgroundImage = NUIApplication.Current.DirectoryInfo.Resource + "0_BG_WHITEsmall.png";
- }
-
- public View Content
- {
- get
- {
- return content;
- }
-
- set
- {
- if (value == content)
- {
- return;
- }
-
- if (value)
- {
- Remove(content);
- value.HeightResizePolicy = ResizePolicyType.FillToParent;
- value.WidthResizePolicy = ResizePolicyType.FillToParent;
- Add(value);
- content = value;
- }
- }
- }
- }
-}