Exemplo n.º 1
0
 public override void FireEvent(string eventName, RoutingStrategyEnum routingStrategy)
 {
     base.FireEvent(eventName, routingStrategy);
     if (eventName == LOSTFOCUS_EVENT || eventName == GOTFOCUS_EVENT)
     {
         UpdateCurrentItem();
     }
 }
Exemplo n.º 2
0
 public override void FireEvent(string eventName, RoutingStrategyEnum routingStrategy)
 {
     base.FireEvent(eventName, routingStrategy);
     if (eventName == LOADED_EVENT)
     {
         UpdateScrollBars();
     }
 }
Exemplo n.º 3
0
 public override void FireEvent(string eventName, RoutingStrategyEnum routingStrategy)
 {
     base.FireEvent(eventName, routingStrategy);
     if (eventName == LOADED_EVENT)
     {
         RegisterKeyBinding();
     }
 }
Exemplo n.º 4
0
 public override void FireEvent(string eventName, RoutingStrategyEnum routingStrategy)
 {
     base.FireEvent(eventName, routingStrategy);
     if (eventName == VISIBILITY_CHANGED_EVENT)
     {
         if (!CheckVisibility())
         {
             // Element lost visibility - notify image sources
             ImageSource source = _sourceState.ImageSource;
             if (source != null)
             {
                 source.VisibilityLost();
             }
             source = _fallbackSourceState.ImageSource;
             if (source != null)
             {
                 source.VisibilityLost();
             }
         }
     }
 }
Exemplo n.º 5
0
        public virtual void FireEvent(string eventName, RoutingStrategyEnum routingStrategy)
        {
            if (routingStrategy == RoutingStrategyEnum.Tunnel)
            {
                // Tunnel strategy: All parents first, then this element
                UIElement parent = VisualParent as UIElement;
                if (parent != null)
                {
                    parent.FireEvent(eventName, routingStrategy);
                }
            }
            UIEventDelegate dlgt = EventOccured;

            if (dlgt != null)
            {
                dlgt(eventName);
            }
            switch (routingStrategy)
            {
            case RoutingStrategyEnum.Bubble:
                // Bubble strategy: First this element, then all parents
                UIElement parent = VisualParent as UIElement;
                if (parent != null)
                {
                    parent.FireEvent(eventName, routingStrategy);
                }
                break;

            case RoutingStrategyEnum.VisualTree:
                // VisualTree strategy: First this element, then all children
                foreach (UIElement child in GetChildren())
                {
                    child.FireEvent(eventName, routingStrategy);
                }
                break;
            }
        }
Exemplo n.º 6
0
 public void FireEvent(string eventName, RoutingStrategyEnum routingStrategy)
 {
   if (routingStrategy == RoutingStrategyEnum.Tunnel)
   {
     // Tunnel strategy: All parents first, then this element
     UIElement parent = VisualParent as UIElement;
     if (parent != null)
       parent.FireEvent(eventName, routingStrategy);
   }
   DoFireEvent(eventName);
   switch (routingStrategy)
   {
     case RoutingStrategyEnum.Bubble:
       // Bubble strategy: First this element, then all parents
       UIElement parent = VisualParent as UIElement;
       if (parent != null)
         parent.FireEvent(eventName, routingStrategy);
       break;
     case RoutingStrategyEnum.VisualTree:
       // VisualTree strategy: First this element, then all children
       foreach (UIElement child in GetChildren())
         child.FireEvent(eventName, routingStrategy);
       break;
   }
 }
Exemplo n.º 7
0
 protected void TriggerScreenEvent(string eventName, RoutingStrategyEnum routingStrategy)
 {
     _pendingScreenEvent = new PendingScreenEvent(eventName, routingStrategy);
 }
Exemplo n.º 8
0
 public PendingScreenEvent(string eventName, RoutingStrategyEnum routingStrategy)
 {
     _eventName       = eventName;
     _routingStrategy = routingStrategy;
 }
Exemplo n.º 9
0
 public override void FireEvent(string eventName, RoutingStrategyEnum routingStrategy)
 {
   base.FireEvent(eventName, routingStrategy);
   if (eventName == LOADED_EVENT)
     UpdateScrollBars();
 }
Exemplo n.º 10
0
 public override void FireEvent(string eventName, RoutingStrategyEnum routingStrategy)
 {
   base.FireEvent(eventName, routingStrategy);
   if (eventName == LOSTFOCUS_EVENT || eventName == GOTFOCUS_EVENT)
     UpdateCurrentItem();
 }
Exemplo n.º 11
0
 public override void FireEvent(string eventName, RoutingStrategyEnum routingStrategy)
 {
   base.FireEvent(eventName, routingStrategy);
   if (eventName == LOADED_EVENT)
     RegisterKeyBinding();
 }
Exemplo n.º 12
0
 public override void FireEvent(string eventName, RoutingStrategyEnum routingStrategy)
 {
   base.FireEvent(eventName, routingStrategy);
   if (eventName == VISIBILITY_CHANGED_EVENT)
   {
     if (!CheckVisibility())
     {
       // Element lost visibility - notify image sources
       ImageSource source = _sourceState.ImageSource;
       if (source != null)
         source.VisibilityLost();
       source = _fallbackSourceState.ImageSource;
       if (source != null)
         source.VisibilityLost();
     }
   }
 }