Replace duplicate documentation of CopyFrom with inheritdoc
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI.Components / Style / SwitchStyle.cs
1 /*
2  * Copyright(c) 2019 Samsung Electronics Co., Ltd.
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  *
16  */
17 using System.ComponentModel;
18 using Tizen.NUI.BaseComponents;
19 using Tizen.NUI.Binding;
20 using Tizen.NUI.Components.Extension;
21
22 namespace Tizen.NUI.Components
23 {
24     /// <summary>
25     /// SwitchStyle is a class which saves Switch's ux data.
26     /// </summary>
27     /// <since_tizen> 8 </since_tizen>
28     public class SwitchStyle : ButtonStyle
29     {
30         static SwitchStyle() { }
31
32         /// <summary>
33         /// Creates a new instance of a SwitchStyle.
34         /// </summary>
35         /// <since_tizen> 8 </since_tizen>
36         public SwitchStyle() : base()
37         {
38         }
39
40         /// <summary>
41         /// Creates a new instance of a SwitchStyle with style.
42         /// </summary>
43         /// <param name="style">Create SwitchStyle by style customized by user.</param>
44         /// <since_tizen> 8 </since_tizen>
45         public SwitchStyle(SwitchStyle style) : base(style)
46         {
47         }
48
49         /// <summary>
50         /// Thumb image's style.
51         /// </summary>
52         /// <since_tizen> 8 </since_tizen>
53         public ImageViewStyle Thumb { get; set; } = new ImageViewStyle();
54
55         /// <summary>
56         /// Track image's style.
57         /// </summary>
58         /// <since_tizen> 8 </since_tizen>
59         public ImageViewStyle Track { get; set; } = new ImageViewStyle();
60
61         /// <inheritdoc/>
62         /// <since_tizen> 8 </since_tizen>
63         public override void CopyFrom(BindableObject bindableObject)
64         {
65             base.CopyFrom(bindableObject);
66
67             if (bindableObject is SwitchStyle switchStyle)
68             {
69                 Track.CopyFrom(switchStyle.Track);
70                 Thumb.CopyFrom(switchStyle.Thumb);
71             }
72         }
73
74         /// <inheritdoc/>
75         [EditorBrowsable(EditorBrowsableState.Never)]
76         public override ButtonExtension CreateExtension()
77         {
78             return new SlidingSwitchExtension();
79         }
80     }
81 }