2 using System.ComponentModel;
4 namespace Tizen.NUI.XamlBinding
7 /// A collection of styles and properties that can be added to an element at run time.
9 internal abstract class Effect
16 /// Gets the element to which the style is attached.
18 public Element Element { get; internal set; }
21 /// Gets a value that tells whether the effect is attached to an element.
23 public bool IsAttached { get; private set; }
26 /// Gets the ID that is used to resolve this effect at runtime.
28 public string ResolveId { get; internal set; }
32 /// Returns an Effect for the specified name, which is of the form ResolutionGroupName.ExportEffect.
34 /// <param name="name">The name of the effect to get.</param>
35 /// <returns>The uniquely identified effect.</returns>
36 public static Effect Resolve(string name)
39 if (Tizen.NUI.XamlBinding.Internals.Registrar.Effects.TryGetValue(name, out Type effectType))
41 result = (Effect)DependencyResolver.ResolveOrCreate(effectType);
45 result = new NullEffect();
46 result.ResolveId = name;
53 /// Method that is called after the effect is attached and made valid.
55 protected abstract void OnAttached();
58 /// Method that is called after the effect is detached and invalidated.
60 protected abstract void OnDetached();
62 internal virtual void ClearEffect()
69 internal virtual void SendAttached()
77 internal virtual void SendDetached()
85 internal virtual void SendOnElementPropertyChanged(PropertyChangedEventArgs args)