Ejemplo n.º 1
0
    public virtual void DataContextChanged(DataContextChangedMessage dataContextMsg)
    {
        if (isBroadcastingDataContextChange || !gameObject.activeInHierarchy)
        {
            return;
        }
        var dcb = GetChildOfDataContextBinder();

        if (dcb != null)
        {
            if (dcb != dataContextMsg.parentContext)
            {
                return;
            }
            else
            {
                //Debug.LogWarning("Child of binder....." + this.gameObject.name + " -- " + dataContextMsg.parentContext);
            }
        }

        DataContext = dataContextMsg.newContext;

        CreateBindings();
        BroadcastDataContextChange(dataContextMsg.newContext);
    }
Ejemplo n.º 2
0
 public override void DataContextChanged(DataContextChangedMessage dataContextMsg)
 {
     if (isBroadcastingDataContextChange || !gameObject.activeInHierarchy) {
         return;
     }
     var dcb = GetChildOfDataContextBinder();
     if (dcb != null) {
         if (dcb != dataContextMsg.parentContext) {
             return;
         } else {
             //Debug.LogWarning("Child of binder....." + this.gameObject.name + " -- " + dataContextMsg.parentContext);
         }
     }
     DataContext = dataContextMsg.newContext;
     CreateBindings();
     BroadcastDataContextChange(childDataContext);
 }