}
}
+ // Resource Ready Signal
+
+ private EventHandler _resourcesLoadedEventHandler;
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void ResourcesLoadedCallbackType(IntPtr control);
+ private ResourcesLoadedCallbackType _ResourcesLoadedCallback;
+
+ /// <summary>
+ /// Event for ResourcesLoadedSignal signal which can be used to subscribe/unsubscribe the event handler provided by the user.<br>
+ /// This signal is emitted after all resources required by a View are loaded and ready.<br>
+ /// </summary>
+ public event EventHandler ResourcesLoaded
+ {
+ add
+ {
+ if (_resourcesLoadedEventHandler == null)
+ {
+ _ResourcesLoadedCallback = OnResourcesLoaded;
+ this.ResourcesLoadedSignal().Connect(_ResourcesLoadedCallback);
+ }
+
+ _resourcesLoadedEventHandler += value;
+ }
+
+ remove
+ {
+ _resourcesLoadedEventHandler -= value;
+
+ if (_resourcesLoadedEventHandler == null && ResourcesLoadedSignal().Empty() == false)
+ {
+ this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
+ }
+ }
+ }
+
+ private void OnResourcesLoaded(IntPtr view)
+ {
+ if (_resourcesLoadedEventHandler != null)
+ {
+ _resourcesLoadedEventHandler(this, null);
+ }
+ }
+
+
internal static View GetViewFromPtr(global::System.IntPtr cPtr)
{
View ret = new View(cPtr, false);
}
/// <summary>
+ /// Query if all resources required by a View are loaded and ready.
+ /// </summary>
+ /// <remarks>Most resources are only loaded when the control is placed on stage
+ /// </remarks>
+ public bool IsResourceReady()
+ {
+ bool ret = NDalicPINVOKE.IsResourceReady(swigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ /// <summary>
/// Raise the view to above the target view.
/// </summary>
/// <remarks>Sibling order of views within the parent will be updated automatically.
return ret;
}
+ internal ViewSignal ResourcesLoadedSignal()
+ {
+ ViewSignal ret = new ViewSignal(NDalicPINVOKE.ResourceReadySignal(swigCPtr), false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
/// <summary>
/// Gets/Sets the origin of an view, within its parent's area.<br>
/// This is expressed in unit coordinates, such that (0.0, 0.0, 0.5) is the top-left corner of the parent, and(1.0, 1.0, 0.5) is the bottom-right corner.<br>