Exemplo n.º 1
0
        /// <summary>
        /// Extends BeginInvoke so that when a state object is not needed, null does not need to be passed.
        /// <example>
        /// contentchangedeventhandler.BeginInvoke(sender, e, callback);
        /// </example>
        /// </summary>
        public static IAsyncResult BeginInvoke(this ContentChangedEventHandler contentchangedeventhandler, Object sender, ContentChangedEventArgs e, AsyncCallback callback)
        {
            if (contentchangedeventhandler == null)
            {
                throw new ArgumentNullException("contentchangedeventhandler");
            }

            return(contentchangedeventhandler.BeginInvoke(sender, e, callback, null));
        }
Exemplo n.º 2
0
        protected virtual void OnRaiseContentChanged(EventArgs e)
        {
            ContentChangedEventHandler ContentChangedHandler = (ContentChangedEventHandler)Events[EditPanel.EventContentChanged];

            if (ContentChangedHandler != null)
            {
                ContentChangedHandler(this, e);
            }
            else
            {
                RaiseBubbleEvent(this, new CommandEventArgs("contentchanged", ""));
            }
        }
 /// <summary>
 /// Remove routed event handler
 /// </summary>
 /// <param name="el"></param>
 /// <param name="handler"></param>
 public static void RemoveContentChangedHandler(UIElement el, ContentChangedEventHandler handler)
 {
     el.RemoveHandler(ContentChangedEvent, handler);
 }
 /// <summary>
 /// Add routeted event handler
 /// </summary>
 /// <param name="el"></param>
 /// <param name="handler"></param>
 public static void AddContentChangedHandler(UIElement el, ContentChangedEventHandler handler)
 {
     el.AddHandler(ContentChangedEvent, handler);
 }
Exemplo n.º 5
0
 public static NElement ContentChanged(this NElement self, ContentChangedEventHandler value)
 {
     return(self.Set(Properties.ContentChanged, value));
 }
Exemplo n.º 6
0
		public static UnmanagedEventHandler CreateContentChangedEventHandlerDispatcher (ContentChangedEventHandler handler)
		{
			return SafeDispatcher ( (sender, calldata, closure)
						=> handler (NativeDependencyObjectHelper.FromIntPtr (closure),
							    NativeDependencyObjectHelper.FromIntPtr (calldata) as ContentChangedEventArgs ?? new ContentChangedEventArgs (calldata)) );
		}
Exemplo n.º 7
0
Arquivo: Events.cs Projeto: ynkbt/moon
 public static UnmanagedEventHandler CreateContentChangedEventHandlerDispatcher(ContentChangedEventHandler handler)
 {
     return(SafeDispatcher((sender, calldata, closure)
                           => handler(NativeDependencyObjectHelper.FromIntPtr(closure),
                                      NativeDependencyObjectHelper.FromIntPtr(calldata) as ContentChangedEventArgs ?? new ContentChangedEventArgs(calldata))));
 }