示例#1
0
        //------------------------------------------------------
        //
        //  Internal Methods
        //
        //------------------------------------------------------

        #region Internal Methods

        // Recursively Raise an Event for all the sub elements
        override internal void RecursiveRaiseEvents(object idProp, AutomationPropertyChangedEventArgs e)
        {
            AutomationInteropProvider.RaiseAutomationPropertyChangedEvent(this, e);
            for (ProxySimple el = GetFirstChild(); el != null; el = this.GetNextSibling(el))
            {
                el.RecursiveRaiseEvents(idProp, e);
            }
        }
示例#2
0
        //------------------------------------------------------
        //
        //  Private Methods
        //
        //------------------------------------------------------

        #region Private Methods

        private static void HandleIsReadOnlyProperty(ProxySimple el, IntPtr hwnd, int eventId)
        {
            // Special call for the ReadOnly Proxperty. If a Windows, becomes
            // enabled/disabled, all of its non hwnd children should become
            // change the read only state.
            if (eventId == NativeMethods.EventObjectStateChange)
            {
                bool fIsReadOnly = SafeNativeMethods.IsWindowEnabled(hwnd);

                el.RecursiveRaiseEvents(ValuePattern.IsReadOnlyProperty, new AutomationPropertyChangedEventArgs(ValuePattern.IsReadOnlyProperty, null, fIsReadOnly));
            }
        }
        //------------------------------------------------------
        //
        //  Private Methods
        //
        //------------------------------------------------------

        #region Private Methods

        private static void HandleIsReadOnlyProperty(ProxySimple el, IntPtr hwnd, int eventId)
        {
            // Special call for the ReadOnly Proxperty. If a Windows, becomes
            // enabled/disabled, all of its non hwnd children should become
            // change the read only state.
            if (eventId == NativeMethods.EventObjectStateChange)
            {
                bool fIsReadOnly = SafeNativeMethods.IsWindowEnabled(hwnd);

                el.RecursiveRaiseEvents(ValuePattern.IsReadOnlyProperty, new AutomationPropertyChangedEventArgs(ValuePattern.IsReadOnlyProperty, null, fIsReadOnly));
            }

        }