Beispiel #1
0
        public static void ExecuteOnUnload(FrameworkElement element, RoutedEventHandler handler)
        {
#endif
#if !XFORMS
            FrameworkElement.UnloadedHandler unloaded = null;
            unloaded = (s, e) => {
                element.Unloaded -= unloaded;
                handler(s, e);
            };
            element.Unloaded += unloaded;
#endif
        }
Beispiel #2
0
        /// <summary>
        /// Executes the handler when the element is unloaded.
        /// </summary>
        /// <param name="element">The element.</param>
        /// <param name="handler">The handler.</param>
#if NOESIS
        public static void ExecuteOnUnload(FrameworkElement element, FrameworkElement.UnloadedHandler handler)
        {