2 * Copyright(c) 2021 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 System.Collections.Generic;
20 using System.ComponentModel;
24 namespace Tizen.NUI.Binding
26 /// <since_tizen> 6 </since_tizen>
27 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
28 [EditorBrowsable(EditorBrowsableState.Never)]
29 [ContentProperty("Setters")]
30 [ProvideCompiled("Tizen.NUI.Xaml.Core.XamlC.PassthroughValueProvider")]
31 [AcceptEmptyServiceProvider]
32 public sealed class Trigger : TriggerBase, IValueProvider
34 /// <since_tizen> 6 </since_tizen>
35 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
36 [EditorBrowsable(EditorBrowsableState.Never)]
37 public Trigger([TypeConverter(typeof(TypeTypeConverter))][Parameter("TargetType")] Type targetType) : base(new XamlPropertyCondition(), targetType)
41 /// <since_tizen> 6 </since_tizen>
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 BindableProperty Property
46 get { return ((XamlPropertyCondition)Condition).Property; }
49 if (((XamlPropertyCondition)Condition).Property == value)
52 throw new InvalidOperationException("Can not change Property once the Trigger has been applied.");
54 ((XamlPropertyCondition)Condition).Property = value;
59 /// <since_tizen> 6 </since_tizen>
60 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
61 [EditorBrowsable(EditorBrowsableState.Never)]
62 public new IList<Setter> Setters
64 get { return base.Setters; }
67 /// <since_tizen> 6 </since_tizen>
68 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
69 [EditorBrowsable(EditorBrowsableState.Never)]
70 [Obsolete("Deprecated in API9, will be removed in API11. Please use GetValue() instead!")]
73 get { return ((XamlPropertyCondition)Condition).Value; }
76 if (((XamlPropertyCondition)Condition).Value == value)
79 throw new InvalidOperationException("Can not change Value once the Trigger has been applied.");
81 ((XamlPropertyCondition)Condition).Value = value;
86 object IValueProvider.ProvideValue(IServiceProvider serviceProvider)
88 //This is no longer required