2 using Tizen.NUI.Binding.Internals;
3 using Tizen.NUI.Binding;
4 using System.ComponentModel;
6 namespace Tizen.NUI.Xaml
8 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
9 [EditorBrowsable(EditorBrowsableState.Never)]
10 [ContentProperty("Path")]
11 [AcceptEmptyServiceProvider]
12 public sealed class BindingExtension : IMarkupExtension<BindingBase>
14 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
15 [EditorBrowsable(EditorBrowsableState.Never)]
16 public string Path { get; set; } = Binding.Binding.SelfPath;
18 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
19 [EditorBrowsable(EditorBrowsableState.Never)]
20 public BindingMode Mode { get; set; } = BindingMode.Default;
22 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
23 [EditorBrowsable(EditorBrowsableState.Never)]
24 public IValueConverter Converter { get; set; }
26 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
27 [EditorBrowsable(EditorBrowsableState.Never)]
28 public object ConverterParameter { get; set; }
30 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
31 [EditorBrowsable(EditorBrowsableState.Never)]
32 public string StringFormat { get; set; }
34 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
35 [EditorBrowsable(EditorBrowsableState.Never)]
36 public object Source { get; set; }
38 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
39 [EditorBrowsable(EditorBrowsableState.Never)]
40 public string UpdateSourceEventName { get; set; }
42 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
43 [EditorBrowsable(EditorBrowsableState.Never)]
44 public object TargetNullValue { get; set; }
46 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
47 [EditorBrowsable(EditorBrowsableState.Never)]
48 public object FallbackValue { get; set; }
50 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
51 [EditorBrowsable(EditorBrowsableState.Never)]
52 public TypedBindingBase TypedBinding { get; set; }
54 BindingBase IMarkupExtension<BindingBase>.ProvideValue(IServiceProvider serviceProvider)
56 if (TypedBinding == null)
57 return new Tizen.NUI.Binding.Binding(Path, Mode, Converter, ConverterParameter, StringFormat, Source)
59 UpdateSourceEventName = UpdateSourceEventName,
60 FallbackValue = FallbackValue,
61 TargetNullValue = TargetNullValue,
64 TypedBinding.Mode = Mode;
65 TypedBinding.Converter = Converter;
66 TypedBinding.ConverterParameter = ConverterParameter;
67 TypedBinding.StringFormat = StringFormat;
68 TypedBinding.Source = Source;
69 TypedBinding.UpdateSourceEventName = UpdateSourceEventName;
70 TypedBinding.FallbackValue = FallbackValue;
71 TypedBinding.TargetNullValue = TargetNullValue;
75 object IMarkupExtension.ProvideValue(IServiceProvider serviceProvider)
77 return (this as IMarkupExtension<BindingBase>).ProvideValue(serviceProvider);