2 * Copyright(c) 2022 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.
20 using System.Reflection;
21 using System.Globalization;
25 using System.ComponentModel;
27 namespace Tizen.NUI.Binding
29 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
30 [EditorBrowsable(EditorBrowsableState.Never)]
31 [ProvideCompiledAttribute("Tizen.NUI.Xaml.Core.XamlC.PointSizeTypeConverter")]
32 public class PointSizeTypeConverter : TypeConverter
34 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
35 [EditorBrowsable(EditorBrowsableState.Never)]
36 public override object ConvertFromInvariantString(string value)
38 if(!string.IsNullOrEmpty(value))
40 return (int)GraphicsTypeManager.Instance.Point.ConvertScriptToPoint(value.Trim());
43 throw new InvalidOperationException($"Cannot convert \"{value}\" into {typeof(int)}");
46 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
47 [EditorBrowsable(EditorBrowsableState.Never)]
48 public override string ConvertToString(object value)
52 int integer = (int)value;
53 return integer.ToString();