public void Show() { state = ElementState.Showing; OutAnimation?.Reset(); SaveProperties(); InAnimation?.Play(false); InAnimation?.Apply(ref props); }
public void Reset() { state = ElementState.Idle; InAnimation?.Reset(); OutAnimation?.Reset(); InAnimation?.Apply(ref props); OutAnimation?.Apply(ref props); SaveProperties(); }
public void Hide() { state = ElementState.Hiding; InAnimation?.Reset(); SaveProperties(); OutAnimation?.Play(true); OutAnimation?.Apply(ref props); if (OutAnimation != null) { OutAnimation.OnFinished += ZeroProperties; } }
public virtual JObject ToJson() { JObject ob = new JObject(); ob["bounds"] = new JArray(Bounds.X, Bounds.Y, Bounds.Width, Bounds.Height); ob["margin"] = new JArray(Margin); ob["drawOrder"] = DrawOrder; ob["opacity"] = Opacity; ob["visible"] = Visible; if (InAnimation != null) { ob["in"] = InAnimation.ToJson(); } if (OutAnimation != null) { ob["out"] = OutAnimation.ToJson(); } return(ob); }