Can I pass events like key strokes to another control in Silverlight?
- by herzmeister der welten
Can I pass events like key strokes to another control in Silverlight?
Imagine I'm in a custom control that contains a Textbox and a Treeview.
I'm listening to a Key event for the TextBox. When the user pushes the Arrow Up or Arrow Down key, I want the Treeview to behave as if it's itself who received that event, i.e. it should move the current selection up or down. The user shouldn't lose focus on the TextBox though so that they can continue typing.
Is this possible? I don't want to set the selection manually on the Treeview because it has no easy MoveSelectionUp() or MoveSelectionDown() method, so I would have to duplicate that functionality which is not so trivial especially when the tree is databound and loads nodes on demand.