public TransitionItemBase GetTransitionAt(uint index) { //to fix memory leak issue, match the handle count with native side. IntPtr cPtr = Interop.TransitionSet.GetTransitionAt(SwigCPtr, index); HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); TransitionItemBase ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as TransitionItemBase; if (cPtr != null && ret == null) { ret = new TransitionItemBase(cPtr, false); if (NDalicPINVOKE.SWIGPendingException.Pending) { throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } return(ret); } Interop.BaseHandle.DeleteBaseHandle(CPtr); CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); if (NDalicPINVOKE.SWIGPendingException.Pending) { throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
internal TransitionItemBase(TransitionItemBase handle) : this(Interop.TransitionItemBase.NewTransitionItemBase(TransitionItemBase.getCPtr(handle)), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) { throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } }
private TransitionSet CreateTransitionSet() { TransitionSet transitionSet = new TransitionSet(); if (animationType != AnimationType.None) { TransitionItemBase transitionItem = null; switch (animationType) { case AnimationType.SeamlessAnimationAppearing: transitionItem = defaultTransition.CreateTransition(ApplicationTransitionManager.Instance.SourceView, providerImage, true); break; case AnimationType.SeamlessAnimationDisappearing: transitionItem = defaultTransition.CreateTransition(providerImage, ApplicationTransitionManager.Instance.SourceView, false); break; case AnimationType.TransitionBaseAppearing: transitionItem = AppearingTransition.CreateTransition(providerImage, true); break; case AnimationType.TransitionBaseDisappearing: transitionItem = DisappearingTransition.CreateTransition(providerImage, false); break; } if (transitionItem != null) { transitionSet.AddTransition(transitionItem); transitionSet.Finished += TransitionSetFinished; transitionItem.Dispose(); transitionItem = null; } } return(transitionSet); }
public void AddTransition(TransitionItemBase transition) { Interop.TransitionSet.AddTransition(SwigCPtr, transition.SwigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) { throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } }
internal TransitionItemBase Assign(TransitionItemBase rhs) { TransitionItemBase ret = new TransitionItemBase(Interop.TransitionItemBase.Assign(SwigCPtr, TransitionItemBase.getCPtr(rhs)), false); if (NDalicPINVOKE.SWIGPendingException.Pending) { throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
/// <summary> /// Downcasts a handle to TransitionItemBase handle.<br /> /// If handle points to an TransitionItemBase object, the downcast produces a valid handle.<br /> /// If not, the returned handle is left uninitialized.<br /> /// </summary> /// <param name="handle">Handle to an object.</param> /// <returns>Handle to an TransitionItemBase object or an uninitialized handle.</returns> /// <exception cref="ArgumentNullException"> Thrown when handle is null. </exception> public static TransitionItemBase DownCast(BaseHandle handle) { if (handle == null) { throw new ArgumentNullException(nameof(handle)); } TransitionItemBase ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as TransitionItemBase; if (NDalicPINVOKE.SWIGPendingException.Pending) { throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public void AddTransition(TransitionItemBase transition) { if (transition is TransitionGroupItem) { TransitionGroupItem transitionGroup = transition as TransitionGroupItem; for (int index = 0; index < transitionGroup.TransitionCount; ++index) { this.AddTransition(transitionGroup.GetTransitionAt(index)); } } else { Interop.TransitionSet.AddTransition(SwigCPtr, transition.SwigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) { throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } } }
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TransitionItemBase obj) { return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.SwigCPtr); }