2 * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
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.
20 namespace ElmSharp.Test
22 public class BackgroundTest3 : TestCaseBase
24 public override string TestName => "BackgroundTest3";
25 public override string TestDescription => "To test basic operation of Background";
27 public override void Run(Window window)
30 Conformant conformant = new Conformant(window);
33 Box box = new Box(window)
41 conformant.SetContent(box);
42 Background bg = new Background(window)
51 Slider red = new Slider(window)
59 Slider green = new Slider(window)
67 Slider blue = new Slider(window)
75 Slider alpha = new Slider(window)
96 bg.Color = new Color(255, 255, 255, 255);
98 EventHandler handler = (s, e) =>
100 bg.Color = new Color((int)red.Value, (int)green.Value, (int)blue.Value, (int)alpha.Value);
103 red.ValueChanged += handler;
104 green.ValueChanged += handler;
105 blue.ValueChanged += handler;
106 alpha.ValueChanged += handler;