// Callback for View ResourceReady signal
private void OnResourceReady(IntPtr data)
{
+ if(!CheckResourceReady())
+ {
+ return;
+ }
+
ResourceReadyEventArgs e = new ResourceReadyEventArgs();
if (data != null)
{
return base.GetNaturalSize();
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ protected override bool CheckResourceReady()
+ {
+ // If we have some properties to be updated, this signal is old thing.
+ // We need to ignore current signal, and wait next.
+ return !(imagePropertyUpdateProcessAttachedFlag && imagePropertyUpdatedFlag);
+ }
+
private void OnResourceLoaded(IntPtr view)
{
+ if(!CheckResourceReady())
+ {
+ return;
+ }
ResourceLoadedEventArgs e = new ResourceLoadedEventArgs();
e.Status = (ResourceLoadingStatusType)Interop.View.GetVisualResourceStatus(this.SwigCPtr, Property.IMAGE);
private void OnResourcesLoaded(IntPtr view)
{
+ if(!CheckResourceReady())
+ {
+ return;
+ }
+
if (resourcesLoadedEventHandler != null)
{
resourcesLoadedEventHandler(this, null);
return false;
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ protected virtual bool CheckResourceReady()
+ {
+ return true;
+ }
+
private ViewSelectorData EnsureSelectorData()
{
if (themeData == null) themeData = new ThemeData();