2 using System.ComponentModel;
3 using Tizen.NUI.Binding.Internals;
5 namespace Tizen.NUI.Binding
8 /// A collection of styles and properties that can be added to an element at run time.
10 [EditorBrowsable(EditorBrowsableState.Never)]
11 internal abstract class Effect
18 /// Gets the element to which the style is attached.
20 public Element Element { get; internal set; }
23 /// Gets a value that tells whether the effect is attached to an element.
25 public bool IsAttached { get; private set; }
28 /// Gets the ID that is used to resolve this effect at runtime.
30 public string ResolveId { get; internal set; }
34 /// Returns an Effect for the specified name, which is of the form ResolutionGroupName.ExportEffect.
36 /// <param name="name">The name of the effect to get.</param>
37 /// <returns>The uniquely identified effect.</returns>
38 public static Effect Resolve(string name)
41 if (Tizen.NUI.Binding.Internals.Registrar.Effects.TryGetValue(name, out Type effectType))
43 result = (Effect)DependencyResolver.ResolveOrCreate(effectType);
47 result = new NullEffect();
48 result.ResolveId = name;
55 /// Method that is called after the effect is attached and made valid.
57 protected abstract void OnAttached();
60 /// Method that is called after the effect is detached and invalidated.
62 protected abstract void OnDetached();
64 internal virtual void ClearEffect()
71 internal virtual void SendAttached()
79 internal virtual void SendDetached()
87 internal virtual void SendOnElementPropertyChanged(PropertyChangedEventArgs args)