سؤال

I couldn't find anything about it online, so is there an interface similar to IMessageFilter for wpf, or a way of using this interface with a wpf window? Thanks.

هل كانت مفيدة؟

المحلول

Short answer is no. There is no equivalent of IMessageFilter in WPF. As per Josh Smith -

There is no equivalent of IMessageFilter in WPF. But you might be able to devise some scheme where your app's main window's wndproc is subclassed and you filter on the power-awareness messages. When they pass through, notify some other class which the entire application can then listen to via Observer pattern.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top