예제 #1
0
 protected virtual void OnPreRender()
 {
     EventHandlerAttribute.Process(this, RoutedEvent.PreRender);
     if (this.PreRender != null)
     {
         this.PreRender(this, this);
     }
 }
        public static void Process(DependencyObject d, RoutedEvent eventType)
        {
            var handlers = EventHandlerAttribute.GetHandlers(d.ObjectType, eventType);

            foreach (var handler in handlers)
            {
                handler.Process(d, d);
            }
        }
        public override void OnLoad()
        {
            EventHandlerAttribute.Process(this, RoutedEvent.Load);

            if (this.Loaded != null)
            {
                this.Loaded(this, this);
            }
            base.OnLoad();
        }
        public override void OnInit()
        {
            EventHandlerAttribute.Process(this, RoutedEvent.Init);

            if (this.Inited != null)
            {
                this.Inited(this, this);
            }
            base.OnInit();
        }