Пример #1
0
        /// <summary>
        /// A static helper method to raise the StateChanged event on a target element.
        /// </summary>
        /// <param name="target">Control or ContentElement on which to raise the event</param>
        static RoutedEventArgs RaiseStateChangedEvent(AvaloniaObject target)
        {
            if (target == null)
            {
                return(null);
            }

            RoutedEventArgs args = new RoutedEventArgs();

            args.RoutedEvent = StateChangedEvent;
            RoutedEventHelper.RaiseEvent(target, args);
            return(args);
        }
        /// <summary>
        ///   A static helper method to raise the StateChanged event on a target element.
        /// </summary>
        /// <param name = "target">UIElement or ContentElement on which to raise the event</param>
        private static RoutedEventArgs RaiseStateChangedEvent(DependencyObject target)
        {
            if (target == null)
            {
                return(null);
            }

            var args = new RoutedEventArgs();

            args.RoutedEvent = StateChangedEvent;
            RoutedEventHelper.RaiseEvent(target, args);
            return(args);
        }