2 * Copyright (c) 2017 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 using Tizen.NUI.BaseComponents;
19 using Tizen.NUI.UIComponents;
21 namespace Tizen.NUI.Examples
23 public class AmbientDuoPage : ContentPage
26 public AmbientDuoPage(Window win) : base (win)
28 Content.BackgroundImage = "/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/ambient/photoduo_img_bg_01_no9patch.png";
29 ClearEvent += OnClearEvent;
30 Content.Opacity = 0.0f;
34 /// To make the ContentPage instance be disposed.
36 protected override void Dispose(DisposeTypes type)
43 if (type == DisposeTypes.Explicit)
47 ClearEvent -= OnClearEvent;
52 public override void SetFocus()
54 Console.WriteLine("AmbientDuoPage focused.");
55 Animation animation = new Animation(2000);
56 animation.AnimateTo(Content, "Opacity", 1.0f);
60 private void OnClearEvent(object obj, EventArgs e)
62 Content.BackgroundImage = "/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/ambient/photoduo_img_bg_01_no9patch.png";