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.
18 using System.ComponentModel;
19 using Tizen.NUI.BaseComponents;
20 using Tizen.NUI.Binding;
21 using Tizen.NUI.Components.Extension;
23 namespace Tizen.NUI.Components
26 /// DefaultGridItemStyle is a class which saves DefaultLinearItem's ux data.
28 [EditorBrowsable(EditorBrowsableState.Never)]
29 public class DefaultGridItemStyle : RecyclerViewItemStyle
32 static DefaultGridItemStyle() { }
35 /// Creates a new instance of a DefaultGridItemStyle.
37 /// <since_tizen> 8 </since_tizen>
38 public DefaultGridItemStyle() : base()
43 /// Creates a new instance of a DefaultGridItemStyle with style.
45 /// <param name="style">Create DefaultGridItemStyle by style customized by user.</param>
46 [EditorBrowsable(EditorBrowsableState.Never)]
47 public DefaultGridItemStyle(DefaultGridItemStyle style) : base(style)
53 /// Label Text's style.
55 [EditorBrowsable(EditorBrowsableState.Never)]
56 public TextLabelStyle Caption { get; set; } = new TextLabelStyle();
61 [EditorBrowsable(EditorBrowsableState.Never)]
62 public ImageViewStyle Image { get; set; } = new ImageViewStyle();
67 [EditorBrowsable(EditorBrowsableState.Never)]
68 public ViewStyle Badge { get; set; } = new ViewStyle();
71 [EditorBrowsable(EditorBrowsableState.Never)]
72 public override void CopyFrom(BindableObject bindableObject)
74 base.CopyFrom(bindableObject);
76 if (bindableObject is DefaultGridItemStyle RecyclerViewItemStyle)
78 Caption.CopyFrom(RecyclerViewItemStyle.Caption);
79 Image.CopyFrom(RecyclerViewItemStyle.Image);
80 Badge.CopyFrom(RecyclerViewItemStyle.Badge);
81 //Border.CopyFrom(RecyclerViewItemStyle.Border);