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.
19 using Tizen.NUI.Binding;
31 public int? KeyInt = null;
36 public string KeyString = null;
41 public PropertyValue TrueValue = null;
43 private string _key = null;
44 private object _originalValue = null;
45 private object _originalKey = null;
48 /// Default Constructor.
70 /// OriginalKey property.
72 public object OriginalKey
81 if (value is int || value is Int32)
85 else if (value is string)
87 KeyString = value.ToString();
89 else if (value.GetType().Equals(typeof(int)) || value.GetType().Equals(typeof(Int32)))
93 else if (value.GetType().Equals(typeof(string)))
95 KeyString = value.ToString();
107 return _originalValue;
111 _originalValue = value;
112 TrueValue = PropertyValue.CreateFromObject(value);
117 /// IntergerValue property.
119 public int IntergerValue
123 TrueValue = new PropertyValue(value);
128 /// BooleanValue property.
130 public bool BooleanValue
134 TrueValue = new PropertyValue(value);
139 /// SingleValue property.
141 public float SingleValue
145 TrueValue = new PropertyValue(value);
150 /// StringValue property.
152 public string StringValue
156 TrueValue = new PropertyValue(value);
161 /// Vector2Value property.
163 public Vector2 Vector2Value
167 TrueValue = new PropertyValue(value);
172 /// Vector3Value property.
174 public Vector3 Vector3Value
178 TrueValue = new PropertyValue(value);
183 /// Vector4Value property.
185 public Vector4 Vector4Value
189 TrueValue = new PropertyValue(value);
194 /// PositionValue property.
196 public Position PositionValue
200 TrueValue = new PropertyValue(value);
205 /// Position2DValue property.
207 public Position2D Position2DValue
211 TrueValue = new PropertyValue(value);
216 /// SizeValue property.
218 public Size SizeValue
222 TrueValue = new PropertyValue(value);
227 /// Size2DValue property.
229 public Size2D Size2DValue
233 TrueValue = new PropertyValue(value);
238 /// ColorValue property.
240 public Color ColorValue
244 TrueValue = new PropertyValue(value);
249 /// RectangleValue property.
251 public Rectangle RectangleValue
255 TrueValue = new PropertyValue(value);
260 /// RotationValue property.
262 public Rotation RotationValue
266 TrueValue = new PropertyValue(value);
271 /// RelativeVector2Value property.
273 public RelativeVector2 RelativeVector2Value
277 TrueValue = new PropertyValue(value);
282 /// RelativeVector3Value property.
284 public RelativeVector3 RelativeVector3Value
288 TrueValue = new PropertyValue(value);
293 /// RelativeVector4Value property.
295 public RelativeVector4 RelativeVector4Value
299 TrueValue = new PropertyValue(value);
304 /// ExtentsValue property.
306 public Extents ExtentsValue
310 TrueValue = new PropertyValue(value);
315 /// PropertyArrayValue property.
317 public PropertyArray PropertyArrayValue
321 TrueValue = new PropertyValue(value);
326 /// PropertyMapValue property.
328 public PropertyMap PropertyMapValue
332 TrueValue = new PropertyValue(value);
336 private void ParseKey(string key)
339 if (VisualExtension.KeyDictionary.ContainsKey(key))
341 VisualExtension.KeyDictionary.TryGetValue(key, out v);