2 * Copyright(c) 2019 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.
17 using System.ComponentModel;
19 namespace Tizen.NUI.CommonUI
22 /// SwitchAttributes is a class which saves Switch's ux data.
24 /// <since_tizen> 6 </since_tizen>
25 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
26 [EditorBrowsable(EditorBrowsableState.Never)]
27 public class SwitchAttributes : ButtonAttributes
30 /// Creates a new instance of a SwitchAttributes.
32 /// <since_tizen> 6 </since_tizen>
33 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
34 [EditorBrowsable(EditorBrowsableState.Never)]
35 public SwitchAttributes() : base() { }
37 /// Creates a new instance of a SwitchAttributes with attributes.
39 /// <param name="attributes">Create SwitchAttributes by attributes customized by user.</param>
40 /// <since_tizen> 6 </since_tizen>
41 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
42 [EditorBrowsable(EditorBrowsableState.Never)]
43 public SwitchAttributes(SwitchAttributes attributes) : base(attributes)
45 if(attributes == null)
49 if (attributes.SwitchHandlerImageAttributes != null)
51 SwitchHandlerImageAttributes = attributes.SwitchHandlerImageAttributes.Clone() as ImageAttributes;
54 if (attributes.SwitchBackgroundImageAttributes != null)
56 SwitchBackgroundImageAttributes = attributes.SwitchBackgroundImageAttributes.Clone() as ImageAttributes;
61 /// Handler image's attributes.
63 /// <since_tizen> 6 </since_tizen>
64 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
65 [EditorBrowsable(EditorBrowsableState.Never)]
66 public ImageAttributes SwitchHandlerImageAttributes
73 /// Background image's attributes.
75 /// <since_tizen> 6 </since_tizen>
76 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
77 [EditorBrowsable(EditorBrowsableState.Never)]
78 public ImageAttributes SwitchBackgroundImageAttributes
85 /// Attributes's clone function.
87 /// <since_tizen> 6 </since_tizen>
88 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
89 [EditorBrowsable(EditorBrowsableState.Never)]
90 public override Attributes Clone()
92 return new SwitchAttributes(this);