2 * Copyright(c) 2021 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.
19 using System.Diagnostics;
21 namespace Tizen.NUI.BaseComponents
24 /// The class storing extra selector properties of view that is rared used.
26 internal class ViewSelectorData
28 internal ViewSelectorData() { }
30 public TriggerableSelector<Color> BackgroundColor{ get; set; }
31 public TriggerableSelector<string> BackgroundImage{ get; set; }
32 public TriggerableSelector<Rectangle> BackgroundImageBorder{ get; set; }
33 public TriggerableSelector<Color> Color{ get; set; }
34 public TriggerableSelector<float?> Opacity{ get; set; }
35 public TriggerableSelector<ImageShadow> ImageShadow{ get; set; }
36 public TriggerableSelector<Shadow> BoxShadow{ get; set; }
38 public void ClearBackground(View view)
40 BackgroundColor?.Reset(view);
41 BackgroundImage?.Reset(view);
42 BackgroundImageBorder?.Reset(view);
43 BackgroundColor = null;
44 BackgroundImage = null;
45 BackgroundImageBorder = null;
47 public void ClearShadow(View view)
49 ImageShadow?.Reset(view);
50 BoxShadow?.Reset(view);
55 public void Reset(View view)
57 BackgroundColor?.Reset(view);
58 BackgroundImage?.Reset(view);
59 BackgroundImageBorder?.Reset(view);
62 ImageShadow?.Reset(view);
63 BoxShadow?.Reset(view);