Current filter:
                                You should refresh the page.
                                  • Hi,
                                    I want to show tooltips for all disabled controls within my application. I found solutions for single controls (i.e. in How to show tooltip on disabled cell. and Showing ToolTip For Disabled Control).
                                    Is there a more general way to set ToolTipService.ShowOnDisabled that does not require to set it on each single control?

                                    Thank you in advance.
                                    Regards,
                                    Michael

                                1 Solution

                                Creation Date Importance Sort by

                                Hello,

                                Showing tooltips for disabled controls in an application is a common WPF task, and thus we don't provide anything special for it. There is a standard property to do this- ToolTipService.ShowOnDisabled. You can try a standard way to affect all controls - create a global Loaded event handler using the standard EventManager.RegisterClassHandler method:

                                [C#]
                                EventManager.RegisterClassHandler(typeof(FrameworkElement), FrameworkElement.LoadedEvent, new RoutedEventHandler((s, e) => OnLoaded(s, e))); //... private void OnLoaded(object s, RoutedEventArgs e) { ToolTipService.SetShowOnDisabled((DependencyObject)e.OriginalSource, true); }

                                In this case, this event handler will be called for all controls, which are inherited from the FrameworkElement class. Please try this approach on your side and provide us with your results.

                                Thanks,
                                Kirill

                                • Michael Schreiber 08.23.2019

                                  Hi Kirill,
                                  I was not aware that my question was more related to WPF in general than to your controls. Maybe I am just too focused on your controls.
                                  Therefore, a very special "Thank you!" for answering my question anyway.
                                  It works perfectly and I like this very generic approach.
                                  Regards,
                                  Michael

                                • Kirill (DevExpress Support) 08.23.2019

                                  You're welcome!