You can create an attached property , listen to its changes, and change the InputBindings collection of the linked window.
Example:
This can be used for any UIElement :
<TextBox ext:AttachedProperties.InputBindingsSource="{Binding InputBindingsList}" />
If you want to be very interested, you can enter INotifyCollectionChanged and update InputBindings if the collection changes, but you will need to unsubscribe from the old collection, and therefore you need to be more careful with this.
source share